Closed
Conversation
This comment has been minimized.
This comment has been minimized.
jasnell
approved these changes
Aug 16, 2021
Mesteery
reviewed
Aug 16, 2021
|
|
||
| function isURLThis(self) { | ||
| return self?.[context] !== undefined; | ||
| return (self !== undefined && self !== null && self[context] !== undefined); |
Contributor
There was a problem hiding this comment.
Suggested change
| return (self !== undefined && self !== null && self[context] !== undefined); | |
| return self != null && self[context] !== undefined; |
Isn't this faster, or at least equivalent?
or like isURLSearchParams?
devsnek
approved these changes
Aug 16, 2021
lpinca
approved these changes
Aug 16, 2021
cjihrig
approved these changes
Aug 19, 2021
BridgeAR
approved these changes
Aug 19, 2021
Flarna
approved these changes
Aug 21, 2021
Collaborator
Collaborator
lpinca
pushed a commit
that referenced
this pull request
Aug 25, 2021
PR-URL: #39778 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Member
|
Landed in f581f6d. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This (mostly) fixes a performance regression introduced in e1e669b. While this PR does help, it doesn't completely restore performance levels pre- e1e669b but it's fairly close.
Example benchmark results:
/cc @jasnell