Conditionals and Loops
JavaScript performance comparison
Info
This test checks to see if when a conditional is supplied as a parameter to a function, and a loop is made inside the function, whether or not it is more efficient to evaluate a conditional once and create two non-interfereing loops rather than to have the conditional evaluated at each loop run.
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Internal conditional |
|
pending… |
External conditional |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments