for...each...of
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
const a = [];
for (let i = 0; i < 1_000_000; i += 1) {
a.push(i);
}
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
Test | Ops/sec | |
---|---|---|
for...each
|
|
pending… |
for
|
|
pending… |
for...of
|
|
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.
- Revision 1: published medns
- Revision 5: published
- Revision 6: published
- Revision 7: published
- Revision 8: published
- Revision 9: published
- Revision 10: published
- Revision 11: published
- Revision 12: published
- Revision 13: published
- Revision 14: published
0 Comments