Skip to content

Commit

Permalink
benchmark: remove forced optimization from url
Browse files Browse the repository at this point in the history
This removes all instances of %OptimizeFunctionOnNextCall from url
benchmarks

PR-URL: #9615
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
bzoz committed Mar 6, 2017
1 parent ea61ce5 commit c5958d2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions benchmark/url/url-format.js
Original file line number Diff line number Diff line change
@@ -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'},
Expand All @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions benchmark/url/url-resolve.js
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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);
Expand Down

0 comments on commit c5958d2

Please sign in to comment.