Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
stream: some simplification#32900
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
writecb casted to boolean has the same value as writing.
nodejs-github-bot commented Apr 17, 2020
Was doing some unecessary checks.
| !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.
mscdex commented Apr 17, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This seems to have a negative effect on |
ronag commented Apr 17, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@mscdex Flaky made? Local: |
ronag commented Apr 17, 2020
Benchmark CI (creation): https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/556/ |
ronag commented Apr 17, 2020
Nope, seems consistent: 17:55:08streams/creation.jskind='duplex'n=50000000***-7.40%±2.49%±3.31%±4.31%Strange... not sure how this PR could cause that |
ronag commented Apr 17, 2020
ronag commented Apr 17, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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.
mscdex commented Apr 17, 2020
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