benchmark: remove forced optimization from util
This removes all instances of %OptimizeFunctionOnNextCall from util 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>
This commit is contained in:
parent
c5958d20fd
commit
ca86aa5323
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
const util = require('util');
|
const util = require('util');
|
||||||
const common = require('../common');
|
const common = require('../common');
|
||||||
const v8 = require('v8');
|
|
||||||
const types = [
|
const types = [
|
||||||
'string',
|
'string',
|
||||||
'number',
|
'number',
|
||||||
@ -29,12 +28,6 @@ function main(conf) {
|
|||||||
|
|
||||||
const input = inputs[type];
|
const input = inputs[type];
|
||||||
|
|
||||||
v8.setFlagsFromString('--allow_natives_syntax');
|
|
||||||
|
|
||||||
util.format(input[0], input[1]);
|
|
||||||
eval('%OptimizeFunctionOnNextCall(util.format)');
|
|
||||||
util.format(input[0], input[1]);
|
|
||||||
|
|
||||||
bench.start();
|
bench.start();
|
||||||
for (var i = 0; i < n; i++) {
|
for (var i = 0; i < n; i++) {
|
||||||
util.format(input[0], input[1]);
|
util.format(input[0], input[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user