Skip to content

stream: simplify `.pipe()` and `.unpipe()` in Readable

Now we are using pipes and pipesCount in Readable state and the pipes value can be a stream or an array of streams. This change reducing them into one pipes value, which is an array of streams.

Benchmark result:

                                       confidence improvement accuracy (*)    (**)   (***)
 streams/pipe-object-mode.js n=5000000                -0.00 %      ±1.79% ±2.38% ±3.09%
 streams/pipe-unpipe.js n=5000000               *      2.20 %      ±2.17% ±2.90% ±3.79%
 streams/pipe.js n=5000000                            -0.36 %      ±1.08% ±1.44% ±1.87%
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading