False loop condition

JavaScript performance comparison

Test case created by SiPlus

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var a = 1;
    var t_false = false, t_undefined = undefined, t_null = null, t_zero = 0, t_nan = NaN, t_empty = '';
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
false
do {a = 1;} while (t_false)
pending…
undefined
do {a = 1;} while (t_undefined)
pending…
null
do {a = 1;} while (t_null)
pending…
NaN
do {a = 1;} while (t_nan)
pending…
Empty string
do {a = 1;} while (t_empty)
pending…
0
do {a = 1;} while (t_zero)
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment