From ea61ce518bed2b8d807062d2f8828739ad6ee693 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 1 Mar 2017 12:46:14 +0100 Subject: [PATCH] benchmark: remove forced optimization from tls This removes all instances of %OptimizeFunctionOnNextCall from tls benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/tls/convertprotocols.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmark/tls/convertprotocols.js b/benchmark/tls/convertprotocols.js index 32da0fe6fde271..5d561455051a0c 100644 --- a/benchmark/tls/convertprotocols.js +++ b/benchmark/tls/convertprotocols.js @@ -12,8 +12,11 @@ function main(conf) { var i = 0; var m = {}; - common.v8ForceOptimization( - tls.convertNPNProtocols, ['ABC', 'XYZ123', 'FOO'], m); + // First call dominates results + if (n > 1) { + tls.convertNPNProtocols(['ABC', 'XYZ123', 'FOO'], m); + m = {}; + } bench.start(); for (; i < n; i++) tls.convertNPNProtocols(['ABC', 'XYZ123', 'FOO'], m); bench.end(n);