-
Notifications
You must be signed in to change notification settings - Fork 30k
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
http: improve for-loop readability in _http_outgoing.js #26408
Conversation
efd378c
to
4b05938
Compare
4b05938
to
bd731a0
Compare
If we change something, I suggest to use |
bd731a0
to
781024d
Compare
@BridgeAR Can you review this again ? thanks. |
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.
I would still check for if (headers != null) {
. That way if there are no headers, we spare two extra checks.
@BridgeAR Good point. I will add it. |
781024d
to
9c0359e
Compare
@BridgeAR Done. |
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 is a very sensitive hot path. I’m -1 to any changes that do not improve our benchmarks.
I think this has 0 impact on performance. Will run a benchmark CI to verify. |
@lpinca I'm pretty sure it has some impact. |
https://jsperf.com/for-of-vs-for-loop they seem to be on par on Chrome 72. |
If this is a problem for 10.x 8.x and 6.x we can add the required "do not land" labels. |
The |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes