From 17c85ffd80a00289479a7355802cd264935e72d4 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Tue, 28 Feb 2017 18:44:14 +0100 Subject: [PATCH] benchmark: remove forced optimization from crypto This removes all instances of %OptimizeFunctionOnNextCall from crypto benchmarks PR-URL: https://github.com/nodejs/node/pull/9615 Reviewed-By: James M Snell Reviewed-By: Matteo Collina --- benchmark/crypto/get-ciphers.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js index 257c9af2fd531e..f6b1767cb4fbcc 100644 --- a/benchmark/crypto/get-ciphers.js +++ b/benchmark/crypto/get-ciphers.js @@ -12,8 +12,11 @@ function main(conf) { const v = conf.v; const method = require(v).getCiphers; var i = 0; - - common.v8ForceOptimization(method); + // first call to getChipers will dominate the results + if (n > 1) { + for (; i < n; i++) + method(); + } bench.start(); for (; i < n; i++) method(); bench.end(n);