Skip to content

Commit c5958d2

Browse files
committed
benchmark: remove forced optimization from url
This removes all instances of %OptimizeFunctionOnNextCall from url benchmarks PR-URL: #9615 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent ea61ce5 commit c5958d2

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

benchmark/url/url-format.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
const common = require('../common.js');
33
const url = require('url');
4-
const v8 = require('v8');
54

65
const inputs = {
76
slashes: {slashes: true, host: 'localhost'},
@@ -24,9 +23,6 @@ function main(conf) {
2423
for (const name in inputs)
2524
url.format(inputs[name]);
2625

27-
v8.setFlagsFromString('--allow_natives_syntax');
28-
eval('%OptimizeFunctionOnNextCall(url.format)');
29-
3026
bench.start();
3127
for (var i = 0; i < n; i += 1)
3228
url.format(input);

benchmark/url/url-resolve.js

-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
const common = require('../common.js');
33
const url = require('url');
4-
const v8 = require('v8');
54
const hrefs = require('../fixtures/url-inputs.js').urls;
65
hrefs.noscheme = 'some.ran/dom/url.thing?oh=yes#whoo';
76

@@ -24,12 +23,6 @@ function main(conf) {
2423
const href = hrefs[conf.href];
2524
const path = paths[conf.path];
2625

27-
// Force-optimize url.resolve() so that the benchmark doesn't get
28-
// disrupted by the optimizer kicking in halfway through.
29-
url.resolve(href, path);
30-
v8.setFlagsFromString('--allow_natives_syntax');
31-
eval('%OptimizeFunctionOnNextCall(url.resolve)');
32-
3326
bench.start();
3427
for (var i = 0; i < n; i += 1)
3528
url.resolve(href, path);

0 commit comments

Comments
 (0)