-
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
url: improve URLSearchParams creation performance #47190
url: improve URLSearchParams creation performance #47190
Conversation
Review requested:
|
7ed296b
to
3bb3f8c
Compare
3bb3f8c
to
cfe7a49
Compare
@mscdex afaik, benchmark ci is down... |
@anonrig Wait for it to come back up or ask @nodejs/build about it? |
Definitely, @mscdex. I created an issue: nodejs/build#3245 |
@nodejs/url please review |
cfe7a49
to
b2cd992
Compare
if ((typeof pair !== 'object' && typeof pair !== 'function') || | ||
pair === null || | ||
typeof pair[SymbolIterator] !== 'function') { | ||
if (pair == null) { |
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.
Can we move this branch to be with the catch-all else
? You'll need to change the if
clause below to
if (pair == null ||
typeof pair !== 'object' && typeof pair !== 'function' ||
typeof pair[SymbolIterator] !== 'function')) {
but it reads a bit nicer.
@mscdex I started a benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1316/ @jasnell @nodejs/url Can you review?
|
Landed in bf41f76 |
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: #47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
PR-URL: nodejs#47190 Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Summary
Footnote
There is one particular change made regarding to a comment written in 2017:
Upon investigating URL spec, I couldn't find any specific reasoning for this and removed it. The spec mentions that:
Benchmark Result
cc @nodejs/url