src/wtf/wtf.js
function computeInner(iterations) {
    var dummy = 0;
    for (var n = 0; n < iterations; n++) {
      // We don't have to worry about this being entirely removed (yet), as
      // JITs don't seem to consider now() as not having side-effects.
      dummy += wtf.now();
    }
    return dummy;
  }
function computeInner(iterations) {
    var dummy = 0;
    for (var n = 0; n < iterations; n++) {
      // We don't have to worry about this being entirely removed (yet), as
      // JITs don't seem to consider now() as not having side-effects.
      dummy += wtf.now();
    }
    return dummy;
  }
function computeInner ( iterations ) { var dummy = 0 ; for ( var n = 0 ; n < iterations ; n ++ ) { // We don't have to worry about this being entirely removed (yet), as // JITs don't seem to consider now() as not having side-effects. dummy += wtf . now ( ) ; } return dummy ; }
This is in a function so that v8 can JIT it easier. We then run it a few times to try to factor out the JIT time.
This is in a function so that v8 can JIT it easier . We then run it a few times to try to factor out the JIT time .