url: performance improvement in URL implementation#10469
url: performance improvement in URL implementation#10469jasnell wants to merge 1 commit intonodejs:masterfrom
Conversation
|
It looks like the file mode was changed accidentally. |
|
I've added |
|
grr.. ok, file mode should be fixed now. |
lib/internal/url.js
Outdated
There was a problem hiding this comment.
While you're at it, maybe != -> !== on lines 222 and 226 below?
lib/internal/url.js
Outdated
There was a problem hiding this comment.
Would !!s !== !!newIsSpecial be better?
There was a problem hiding this comment.
this[special] is guaranteed to be a boolean. s and !s are sufficient. There's no need (and no benefit) for getting fancy with it.
|
Updated to address nits |
lib/internal/url.js
Outdated
There was a problem hiding this comment.
ha! good catch... fixed!
lib/internal/url.js
Outdated
There was a problem hiding this comment.
I'm surprised that we have to do this. Isn't it like caching the length of an array before a for loop (which V8 is able to optimize)?
There was a problem hiding this comment.
I wouldn't say that we have to do this. This is more a code hygiene thing for me to avoid duplicated accessor calls but beyond that the impact is negligible.
|
This PR will need to be updated after #10408 lands. Marking as blocked until that does. |
Yields about a 25% average performance improvement
|
Updated.. unblocking |
|
Failures in freebsd are unrelated |
Yields about a 25% average performance improvement PR-URL: #10469 Reviewed-By: Michaël Zasso <targos@protonmail.com>
|
Landed in 2213f36 |
|
FWIW I just noticed the file mode changed again in the landed commit. |
|
Ugh. My git client appears to be completely ignoring my global config
setting to ignore file mode changes. Getting quite frustrated with it.
Thanks for the heads up
…On Fri, Dec 30, 2016 at 12:55 PM Brian White ***@***.***> wrote:
FWIW I just noticed the file mode changed again in the landed commit.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#10469 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAa2ecyLIEsShUdeZDZEqL7tm0v8ZGqXks5rNW_CgaJpZM4LWB-R>
.
|
Yields about a 25% average performance improvement PR-URL: #10469 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Yields about a 25% average performance improvement PR-URL: #10469 Reviewed-By: Michaël Zasso <targos@protonmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
url
Description of change
Yields about a 25% average performance improvement