Permalink
Browse files

benchmark: remove streams forced optimization

This removes all instances of %OptimizeFunctionOnNextCall from streams
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 1, 2017
1 parent 57b5ce1 commit 541119c6ee5dc8dca1115569dd640e4753dcce40
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
function noop() {}
s._read = noop;
// Force optimization before starting the benchmark
s.push(b);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(s.read)');
s.push(b);
while (s.read(128));
bench.start();
for (var k = 0; k < n; ++k) {
for (var i = 0; i < 1e4; ++i)
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
function noop() {}
s._read = noop;
// Force optimization before starting the benchmark
s.push(b);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(s.read)');
s.push(b);
while (s.read(106));
bench.start();
for (var k = 0; k < n; ++k) {
for (var i = 0; i < 1e4; ++i)
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;
const bench = common.createBenchmark(main, {
@@ -15,14 +14,6 @@ function main(conf) {
function noop() {}
s._read = noop;
// Force optimization before starting the benchmark
s.push(b);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(s.push)');
eval('%OptimizeFunctionOnNextCall(s.read)');
s.push(b);
while (s.read(32));
bench.start();
for (var k = 0; k < n; ++k) {
for (var i = 0; i < 1e4; ++i)
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
function noop() {}
s._read = noop;
// Force optimization before starting the benchmark
s.push(b);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(s.read)');
s.push(b);
while (s.read());
bench.start();
for (var k = 0; k < n; ++k) {
for (var i = 0; i < 1e4; ++i)
@@ -1,7 +1,6 @@
'use strict';
const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
function noop() {}
s._read = noop;
// Force optimization before starting the benchmark
s.push(b);
v8.setFlagsFromString('--allow_natives_syntax');
eval('%OptimizeFunctionOnNextCall(s.read)');
s.push(b);
while (s.read(12));
bench.start();
for (var k = 0; k < n; ++k) {
for (var i = 0; i < 1e4; ++i)

0 comments on commit 541119c

Please sign in to comment.