Skip to content

Commit 541119c

Browse files
committed
benchmark: remove streams forced optimization
This removes all instances of %OptimizeFunctionOnNextCall from streams benchmarks PR-URL: #9615 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 57b5ce1 commit 541119c

5 files changed

+0
-41
lines changed

benchmark/streams/readable-bigread.js

-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common');
4-
const v8 = require('v8');
54
const Readable = require('stream').Readable;
65

76
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
1514
function noop() {}
1615
s._read = noop;
1716

18-
// Force optimization before starting the benchmark
19-
s.push(b);
20-
v8.setFlagsFromString('--allow_natives_syntax');
21-
eval('%OptimizeFunctionOnNextCall(s.read)');
22-
s.push(b);
23-
while (s.read(128));
24-
2517
bench.start();
2618
for (var k = 0; k < n; ++k) {
2719
for (var i = 0; i < 1e4; ++i)

benchmark/streams/readable-bigunevenread.js

-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common');
4-
const v8 = require('v8');
54
const Readable = require('stream').Readable;
65

76
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
1514
function noop() {}
1615
s._read = noop;
1716

18-
// Force optimization before starting the benchmark
19-
s.push(b);
20-
v8.setFlagsFromString('--allow_natives_syntax');
21-
eval('%OptimizeFunctionOnNextCall(s.read)');
22-
s.push(b);
23-
while (s.read(106));
24-
2517
bench.start();
2618
for (var k = 0; k < n; ++k) {
2719
for (var i = 0; i < 1e4; ++i)

benchmark/streams/readable-boundaryread.js

-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common');
4-
const v8 = require('v8');
54
const Readable = require('stream').Readable;
65

76
const bench = common.createBenchmark(main, {
@@ -15,14 +14,6 @@ function main(conf) {
1514
function noop() {}
1615
s._read = noop;
1716

18-
// Force optimization before starting the benchmark
19-
s.push(b);
20-
v8.setFlagsFromString('--allow_natives_syntax');
21-
eval('%OptimizeFunctionOnNextCall(s.push)');
22-
eval('%OptimizeFunctionOnNextCall(s.read)');
23-
s.push(b);
24-
while (s.read(32));
25-
2617
bench.start();
2718
for (var k = 0; k < n; ++k) {
2819
for (var i = 0; i < 1e4; ++i)

benchmark/streams/readable-readall.js

-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common');
4-
const v8 = require('v8');
54
const Readable = require('stream').Readable;
65

76
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
1514
function noop() {}
1615
s._read = noop;
1716

18-
// Force optimization before starting the benchmark
19-
s.push(b);
20-
v8.setFlagsFromString('--allow_natives_syntax');
21-
eval('%OptimizeFunctionOnNextCall(s.read)');
22-
s.push(b);
23-
while (s.read());
24-
2517
bench.start();
2618
for (var k = 0; k < n; ++k) {
2719
for (var i = 0; i < 1e4; ++i)

benchmark/streams/readable-unevenread.js

-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const common = require('../common');
4-
const v8 = require('v8');
54
const Readable = require('stream').Readable;
65

76
const bench = common.createBenchmark(main, {
@@ -15,13 +14,6 @@ function main(conf) {
1514
function noop() {}
1615
s._read = noop;
1716

18-
// Force optimization before starting the benchmark
19-
s.push(b);
20-
v8.setFlagsFromString('--allow_natives_syntax');
21-
eval('%OptimizeFunctionOnNextCall(s.read)');
22-
s.push(b);
23-
while (s.read(12));
24-
2517
bench.start();
2618
for (var k = 0; k < n; ++k) {
2719
for (var i = 0; i < 1e4; ++i)

0 commit comments

Comments
 (0)