-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
url: using util._extend for improving profermace #16081
Conversation
`Object.assign` is much slower than `util._extend` according to the refs. This change is to convert the `Object.assign` to use `util._extend` in url module for improving profermance. Refs: nodejs/CTC#62
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.
/cc @mscdex
LGTM |
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.
@bmeurer ... this might be another case worth exploring to see why Object.assign()
is slower. I'd much prefer to be using assign here.
@jasnell The fact that |
@bmeurer ...I owe you the beverage of your choice for all the work you've done optimizing things. |
There are still some code using Should we convert them into using |
@jasnell I'd say coffee or beer, but at this point I'm not allowed to drink either. @starkwang Don't hold your breath for this. It'll probably take at least until V8 6.4, maybe even longer to get this on par (@camillobruni is on it). So maybe for Node 8 just go with |
IMHO it's not worthwhile in I/O wrappers (like |
Landed in c1cd731 |
`Object.assign` is much slower than `util._extend` according to the refs. This change is to convert the `Object.assign` to use `util._extend` in url module for improving profermance. PR-URL: #16081 Refs: nodejs/CTC#62 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
@mscdex I don't really like that idea, especially since I'd love to get rid of I was thinking that |
Oh, I hadn't even considered the |
`Object.assign` is much slower than `util._extend` according to the refs. This change is to convert the `Object.assign` to use `util._extend` in url module for improving profermance. PR-URL: nodejs/node#16081 Refs: nodejs/CTC#62 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
`Object.assign` is much slower than `util._extend` according to the refs. This change is to convert the `Object.assign` to use `util._extend` in url module for improving profermance. PR-URL: #16081 Refs: nodejs/CTC#62 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
Object.assign
is much slower thanutil._extend
according tothe refs. This change is to convert the
Object.assign
to useutil._extend
in url module for improving profermance.Refs: nodejs/CTC#62
Benchmark:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
url