bitwise-around-max-int

JavaScript performance comparison

Revision 2 of this test case created by Geoffrey Sneddon

Preparation code

 
<script>
Benchmark.prototype.setup = function() {
    // These are separate to avoid specialization cross-contaminating tests
   
    function t1(lhs, rhs) {
      return lhs | rhs;
    }
   
    function t2(lhs, rhs) {
      return lhs | rhs;
    }
   
    function t3(lhs, rhs) {
      return lhs | rhs;
    }
   
    function t4(lhs, rhs) {
      return lhs | rhs;
    }
   
    function t5(lhs, rhs) {
      return lhs | rhs;
    }
};
</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
max-signed-31-bit
t1(0x3FFFFFFF, 1);
pending…
max-signed-32-bit
t2(0x7FFFFFFF, 1);
pending…
max-signed-33-bit
t3(0xFFFFFFFF, 1);
pending…
max-signed-34-bit
t4(0x1FFFFFFFF, 1);
pending…
max-signed-35-bit
t5(0x3FFFFFFFF, 1);
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:

0 comments

Add a comment