js for in loop test
JavaScript performance comparison
Preparation code
<script>
var arr = new Array(1000 + 1).join('0').split('');
var foo = {
"bar":{
"method":{
"add":function(n) {
return ++n;
}
}
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
for in loop |
|
pending… |
for in loop hasownproperty check |
|
pending… |
not local |
|
pending… |
forEach |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments