Skip to content

punycode: use strict identity operator#2644

Closed
JungMinu wants to merge 1 commit into
nodejs:masterfrom
JungMinu:patch-8
Closed

punycode: use strict identity operator#2644
JungMinu wants to merge 1 commit into
nodejs:masterfrom
JungMinu:patch-8

Conversation

@JungMinu

@JungMinu JungMinu commented Sep 2, 2015

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@targos

targos commented Sep 2, 2015

Copy link
Copy Markdown
Member

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

@bnoordhuis

Copy link
Copy Markdown
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
Copy Markdown
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

JungMinu commented Sep 2, 2015

Copy link
Copy Markdown
Member Author

@mathiasbynens Sure, I will
Thanks for your comment!

@targos

targos commented Sep 2, 2015

Copy link
Copy Markdown
Member

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