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

Use explicit .valueOf() calls instead of coercion #2877

Closed
wants to merge 1 commit into from

Conversation

topaxi
Copy link
Contributor

@topaxi topaxi commented Jan 8, 2016

This seems to result in speedups by around 10% for comparing moments.

http://jsperf.com/explicit-valueof-for-momentjs

@mattjohnsonpint
Copy link
Contributor

Doesn't seem like it would hurt. It's only a few extra characters. @ichernev, thoughts?

@maggiepint maggiepint added this to the 2.13.0 milestone Apr 10, 2016
@ichernev
Copy link
Contributor

Sure, 10% faster is good. Thank you @topaxi

@ichernev
Copy link
Contributor

Merged in 2749f08

@ichernev ichernev closed this Apr 16, 2016
ichernev added a commit that referenced this pull request Apr 16, 2016
Use explicit .valueOf() calls instead of coercion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants