obj.property iteration
JavaScript performance comparison
Info
Belts, suspenders and newtometers
Preparation code
<script>
Benchmark.prototype.setup = function() {
var propcount = 0, myObjConst = function(){};
myObjConst.prototype.ohno = "ignoremeplz";
var myObj = new myObjConst;
for(var i = 100;i--;){myObj[i] = i;}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
prototype.hOP |
|
pending… |
precheck, myObj.hOP |
|
pending… |
precheck, predeclare, myObj.hOP |
|
pending… |
keys.forEach - nostalgia-free |
|
pending… |
oh no |
|
pending… |
precheck, predeclare, myObj.hOP no work-load |
|
pending… |
keys.forEach - nostalgia-free - no work |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by unomi
- Revision 2: published by Heinrich Göbl
- Revision 3: published by Jimb Esser
- Revision 4: published by bga_
- Revision 5: published
0 comments