Skip to content

Commit

Permalink
benchmark: remove streams forced optimization
Browse files Browse the repository at this point in the history
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 6, 2017
1 parent 57b5ce1 commit 541119c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 41 deletions.
8 changes: 0 additions & 8 deletions benchmark/streams/readable-bigread.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;

const bench = common.createBenchmark(main, {
Expand All @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions benchmark/streams/readable-bigunevenread.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;

const bench = common.createBenchmark(main, {
Expand All @@ -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)
Expand Down
9 changes: 0 additions & 9 deletions benchmark/streams/readable-boundaryread.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;

const bench = common.createBenchmark(main, {
Expand All @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions benchmark/streams/readable-readall.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;

const bench = common.createBenchmark(main, {
Expand All @@ -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)
Expand Down
8 changes: 0 additions & 8 deletions benchmark/streams/readable-unevenread.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common');
const v8 = require('v8');
const Readable = require('stream').Readable;

const bench = common.createBenchmark(main, {
Expand All @@ -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)
Expand Down

0 comments on commit 541119c

Please sign in to comment.