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:
authorBartosz Sosnowski <bartosz@janeasystems.com>2017-03-01 14:46:37 +0300
committerBartosz Sosnowski <bartosz@janeasystems.com>2017-03-06 18:32:04 +0300
commitc5958d20fdf5702247e790d7ebc87c7005dc11f0 (patch)
tree288d2caa7e49309556710735fb6478b4a75f1632 /benchmark/url
parentea61ce518bed2b8d807062d2f8828739ad6ee693 (diff)
benchmark: remove forced optimization from url
This removes all instances of %OptimizeFunctionOnNextCall from url benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'benchmark/url')
-rw-r--r--benchmark/url/url-format.js4
-rw-r--r--benchmark/url/url-resolve.js7
2 files changed, 0 insertions, 11 deletions
diff --git a/benchmark/url/url-format.js b/benchmark/url/url-format.js
index 886958406b9..771786d3350 100644
--- a/benchmark/url/url-format.js
+++ b/benchmark/url/url-format.js
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
const url = require('url');
-const v8 = require('v8');
const inputs = {
slashes: {slashes: true, host: 'localhost'},
@@ -24,9 +23,6 @@ function main(conf) {
for (const name in inputs)
url.format(inputs[name]);
- v8.setFlagsFromString('--allow_natives_syntax');
- eval('%OptimizeFunctionOnNextCall(url.format)');
-
bench.start();
for (var i = 0; i < n; i += 1)
url.format(input);
diff --git a/benchmark/url/url-resolve.js b/benchmark/url/url-resolve.js
index 4335511ca6d..421a70ef6d5 100644
--- a/benchmark/url/url-resolve.js
+++ b/benchmark/url/url-resolve.js
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common.js');
const url = require('url');
-const v8 = require('v8');
const hrefs = require('../fixtures/url-inputs.js').urls;
hrefs.noscheme = 'some.ran/dom/url.thing?oh=yes#whoo';
@@ -24,12 +23,6 @@ function main(conf) {
const href = hrefs[conf.href];
const path = paths[conf.path];
- // Force-optimize url.resolve() so that the benchmark doesn't get
- // disrupted by the optimizer kicking in halfway through.
- url.resolve(href, path);
- v8.setFlagsFromString('--allow_natives_syntax');
- eval('%OptimizeFunctionOnNextCall(url.resolve)');
-
bench.start();
for (var i = 0; i < n; i += 1)
url.resolve(href, path);