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.
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