Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Lau <riclau@uk.ibm.com>2020-09-10 02:48:00 +0300
committerRichard Lau <riclau@uk.ibm.com>2020-09-10 02:49:34 +0300
commit0f94c6b4e4dd4b3f0d30d40b2063db6a0ccf0e0d (patch)
tree259481328c227b1a925f0c8ef5efb1d3b10966ea /benchmark
parent2d52bdf5c6566a40af359fb3be7e449d855fabe9 (diff)
Revert "stream: simpler and faster Readable async iterator"
This reverts commit 4bb40078da9ff51372459ff187b74866d73c3fb2.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/streams/readable-async-iterator.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/benchmark/streams/readable-async-iterator.js b/benchmark/streams/readable-async-iterator.js
deleted file mode 100644
index dbe335ab98b..00000000000
--- a/benchmark/streams/readable-async-iterator.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-const common = require('../common');
-const Readable = require('stream').Readable;
-
-const bench = common.createBenchmark(main, {
- n: [1e5],
- sync: ['yes', 'no'],
-});
-
-async function main({ n, sync }) {
- sync = sync === 'yes';
-
- const s = new Readable({
- objectMode: true,
- read() {
- if (sync) {
- this.push(1);
- } else {
- process.nextTick(() => {
- this.push(1);
- });
- }
- }
- });
-
- bench.start();
-
- let x = 0;
- for await (const chunk of s) {
- x += chunk;
- if (x > n) {
- break;
- }
- }
-
- bench.end(n);
-}