alea vs math.random

Benchmark created on


Preparation HTML

<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
<script src="http://yui.yahooapis.com/combo?gallery-2012.10.10-19-59/build/gallery-alea/gallery-alea-min.js"></script>
<script>
    var Y = YUI().use('gallery-alea');
</script>

Setup

var aleaRandom = new Y.Alea().random;
    var mathRandom = Math.random;

Test runner

Ready to run.

Testing in
TestOps/sec
aleaRandom
aleaRandom();
ready
mathRandom
mathRandom();
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.