Random vs Random vs Random

JavaScript performance comparison

Test case created

Info

Using the random number generator returns, well, random execution times. One should avoid using them in the time sections of any benchmark test.

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Random1
var a = Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random();
pending…
Random2
var a = Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random();
pending…
Random3
var a = Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random();
pending…
Random4
var a = Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random() + Math.random() * Math.random() * Math.random() * Math.random();
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