-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stream: optimize creation #29135
stream: optimize creation #29135
Conversation
@nodejs/streams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lib/_stream_readable.js
Outdated
// However, some cases require setting options to different | ||
// values for the readable and the writable sides of the duplex stream. | ||
// These options can be provided separately as readableXXX and writableXXX. | ||
function ReadableState(options, isDuplex) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing the stream
parameter
e160d2a
to
7ce2ad9
Compare
This apparently needs a rebase in order to run benchmarks in CI. |
7ce2ad9
to
e432835
Compare
rebased |
@mscdex: Another try at Benchmark CI? |
Benchmark results from CI: 19:26:09 confidence improvement accuracy (*) (**) (***)
19:26:09 streams/creation.js kind='duplex' n=50000000 *** 16.85 % ±2.12% ±2.82% ±3.67%
19:26:09 streams/creation.js kind='readable' n=50000000 1.41 % ±1.82% ±2.43% ±3.16%
19:26:09 streams/creation.js kind='transform' n=50000000 *** 9.88 % ±1.71% ±2.28% ±2.96%
19:26:09 streams/creation.js kind='writable' n=50000000 ** -3.08 % ±1.95% ±2.60% ±3.38%
19:26:09 Seems good to me, but posting here in case anyone thinks the one slightly slower benchmark result is critical. (I imagine we're more interested in the two positive results that are both more statistically significant and larger in magnitude.) |
PR-URL: #29135 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Landed in bd02775. |
PR-URL: #29135 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
PR-URL: #29135 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Optimize stream creation.
Takes the non-controversial parts of #29127.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes