mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
benchmark: remove streams forced optimization
This removes all instances of %OptimizeFunctionOnNextCall from streams 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user