-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: some simplification #32900
stream: some simplification #32900
Conversation
writecb casted to boolean has the same value as writing.
Was doing some unecessary checks.
959cba0
to
4ac87be
Compare
!state.corked && | ||
!state.bufferProcessing && | ||
state.bufferedRequest) { | ||
if (state.bufferedRequest) { |
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.
This condition is a duplicate of what's inside of clearBuffer
. However, it is here on purpose since clearBuffer
is not inlineable.
This seems to have a negative effect on
|
@mscdex Flaky made? Local:
|
Benchmark CI (creation): https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/556/ |
Nope, seems consistent: 17:55:08 streams/creation.js kind='duplex' n=50000000 *** -7.40 % ±2.49% ±3.31% ±4.31% Strange... not sure how this PR could cause that |
@mscdex: I'm quite baffled why this PR would affect duplex creation performance. Any ideas? Anyway, a 7% performance increase in writing I guess is still worth it with a 7% performance degradation in creation? |
This reverts commit 206f62b.
I don't know offhand, you'd probably have to compare either the generated/optimized code or optimizer/inliner trace output before and after this PR to see what is different. |
~7% improvement
NOTE: Contains 2 commits to reduce the number of PRs.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes