Skip to content
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

punycode: use strict identity operator #2644

Closed
wants to merge 1 commit into from
Closed

punycode: use strict identity operator #2644

wants to merge 1 commit into from

Conversation

JungMinu
Copy link
Member

@JungMinu JungMinu commented Sep 2, 2015

There is no type-conversion to be done because both parameters are already the same type.
Therefore, the === operator should be used for better performance.

There is no type-conversion to be done because both parameters are already the same type. 
Therefore, the === operator should be used for better performance.
@thefourtheye
Copy link
Contributor

Tried #2582 and #2392 already. They didn't fly :(

@targos
Copy link
Member

targos commented Sep 2, 2015

Also punycode is an external dependency. Changes to it should be proposed in the original project.

@bnoordhuis
Copy link
Member

/cc @mathiasbynens - maybe you can pull this into punycode.js? There are some mild performance benefits associated with strict equality checks.

@mathiasbynens
Copy link
Contributor

As @targos said, could you make this PR against https://github.com/bestiejs/punycode.js so we can discuss it there?

I seriously doubt == vs. === is ever going to be a performance bottleneck. Do you have a benchmark that demonstrates the improved performance you mentioned?

@JungMinu
Copy link
Member Author

JungMinu commented Sep 2, 2015

@mathiasbynens Sure, I will
Thanks for your comment!

@targos
Copy link
Member

targos commented Sep 2, 2015

Closing, discussion can continue on mathiasbynens/punycode.js#35.

@targos targos closed this Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants