Computing powers of 2

JavaScript performance comparison

Test case created

Info

Compare bit shifting with Math.pow

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Math.pow
Math.pow(2, 31);
pending…
Bit shifting
1 << 31;
pending…
Other exponents
Math.pow(3, 31);
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