bool

JavaScript performance comparison

Test case created by calvin

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    var a= {w:Math.round(Math.random()),h:Math.round(Math.random())}
    var b= {w:Math.round(Math.random()),h:Math.round(Math.random())}
};
</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
reg
(a.h===0&&a.w===0)||(b.h===0&&b.w===0)
pending…
min
!((a.h||a.w)&&(b.h||b.w))
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