Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/path/parse-posix.js')
-rw-r--r--benchmark/path/parse-posix.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/benchmark/path/parse-posix.js b/benchmark/path/parse-posix.js
index ee4306fcd27..997eec0452b 100644
--- a/benchmark/path/parse-posix.js
+++ b/benchmark/path/parse-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, {
path: [
@@ -21,15 +20,12 @@ function main(conf) {
var p = path.posix;
var input = '' + conf.path;
- // Force optimization before starting the benchmark
- p.parse(input);
- v8.setFlagsFromString('--allow_natives_syntax');
- eval('%OptimizeFunctionOnNextCall(p.parse)');
- p.parse(input);
-
- bench.start();
for (var i = 0; i < n; i++) {
p.parse(input);
}
+ bench.start();
+ for (i = 0; i < n; i++) {
+ p.parse(input);
+ }
bench.end(n);
}