find min

Benchmark created on


Setup

var a = [];
for (var i = 0; i < 10000000; i++) a[i] = Math.random();

Test runner

Ready to run.

Testing in
TestOps/sec
sort + first
a.sort();
window.v = a[0];
ready
find min
var v = a[0];
for (var i = 0; i < a.length; i++) if (a[i] < v) v = a[i];
window.v = v;
ready

Revisions

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