-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
perf: replace endsWith with === #12539
Conversation
|
I'm not sure about this. I'd prefer if it indexes one char only, when searching longer words I think |
Did you measure the perf diff on this one @sun0day? I also think that this is going too far. I think we better keep using |
I only tested the js code performance between The thing is that plain But also I know that |
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.
Looking forward to the next major where we can use String.prototype.at to make these more compact.
Thank you for identifying this performance issue. I have reported it to the V8 project. |
Thanks @robpalme 🙏🏼 |
@patak-dev Hi, there, The issue with |
Description
Similar to #12531, this PR uses
===
instead ofendsWith
in some hot extensions.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).