diff options
Diffstat (limited to 'benchmark/path/relative-posix.js')
-rw-r--r-- | benchmark/path/relative-posix.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/benchmark/path/relative-posix.js b/benchmark/path/relative-posix.js index 7544fb2dc6..492b73c3e8 100644 --- a/benchmark/path/relative-posix.js +++ b/benchmark/path/relative-posix.js @@ -1,7 +1,6 @@ 'use strict'; var common = require('../common.js'); var path = require('path'); -var v8 = require('v8'); var bench = common.createBenchmark(main, { paths: [ @@ -26,15 +25,12 @@ function main(conf) { to = from.slice(delimIdx + 1); from = from.slice(0, delimIdx); } - - // Force optimization before starting the benchmark - p.relative(from, to); - v8.setFlagsFromString('--allow_natives_syntax'); - eval('%OptimizeFunctionOnNextCall(p.relative)'); - p.relative(from, to); + for (var i = 0; i < n; i++) { + p.relative(from, to); + } bench.start(); - for (var i = 0; i < n; i++) { + for (i = 0; i < n; i++) { p.relative(from, to); } bench.end(n); |