Decimal Exponentiation

JavaScript performance comparison

Test case created by Peteris Erins

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
exponential notation
var sum = 0;
for (var i = 1; i < 20; ++i){
  sum += +("1E" + i);
}
pending…
pow
var sum = 0;
for (var i = 0; i < 20; ++i){
  Math.pow(10, i);
}
pending…
manual decimal
var sum = 0;
sum += 1e0;
sum += 1e1;
sum += 1e2;
sum += 1e3;
sum += 1e4;
sum += 1e5;
sum += 1e6;
sum += 1e7;
sum += 1e8;
sum += 1e9;
sum += 1e10;
sum += 1e11;
sum += 1e12;
sum += 1e13;
sum += 1e14;
sum += 1e15;
sum += 1e16;
sum += 1e17;
sum += 1e18;
sum += 1e19;
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