bench.js
function run (N, op, init) {
  var stats = null, value
  for(var j = 0; j < 100; j++) {
    if(init) value = init(j)
    var start = Date.now()
    for(var i = 0; i < N; i++) op(value, i)
    stats = Stats(stats, N/((Date.now() - start)))
  }
  return stats
}
function run (N, op, init) {
  var stats = null, value
  for(var j = 0; j < 100; j++) {
    if(init) value = init(j)
    var start = Date.now()
    for(var i = 0; i < N; i++) op(value, i)
    stats = Stats(stats, N/((Date.now() - start)))
  }
  return stats
}
function run ( N , op , init ) { var stats = null , value for ( var j = 0 ; j < 100 ; j ++ ) { if ( init ) value = init ( j ) var start = Date . now ( ) for ( var i = 0 ; i < N ; i ++ ) op ( value , i ) stats = Stats ( stats , N / ( ( Date . now ( ) - start ) ) ) } return stats }
simple benchmarks, and measure standard deviation
simple benchmarks and measure standard deviation