for vs while
JavaScript performance comparison
Info
for vs while
Preparation code
<script>
Benchmark.prototype.setup = function() {
var result = 0,
steps = 100;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
for |
|
pending… |
optimised for |
|
pending… |
while |
|
pending… |
for i++ |
|
pending… |
for inline |
|
pending… |
for infinite |
|
pending… |
for v2 |
|
pending… |
while 2 |
|
pending… |
holy grail |
|
pending… |
holy grail 2 |
|
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 antimatter15
- Revision 2: published by David Calhoun
- Revision 3: published by Leonardo Dutra
- Revision 4: published by Anthony M
- Revision 5: published
- Revision 6: published
- Revision 7: published
- Revision 8: published by devu
- Revision 9: published by Jörn Berkefeld
- Revision 10: published by Milan Adamovsky
- Revision 11: published by Milan Adamovsky and last updated
- Revision 14: published by Rick Waldron
- Revision 15: published by Jeff Tierney
- Revision 16: published
- Revision 17: published
- Revision 18: published by Milan Adamovsky
- Revision 20: published
- Revision 21: published by Milan Adamovsky
- Revision 22: published by Mayhem
- Revision 23: published by Mike Lee
- Revision 24: published by Milan Adamovsky2
- Revision 25: published
- Revision 26: published
- Revision 27: published
- Revision 28: published by Milan Adamovsky
3 comments
Aren't the results incredible??
Very Nice ...
thanks
The tests got fixed. They yielded skewed results. The quest goes on.