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

Added optimizations specified in #2 #9

Closed
wants to merge 1 commit into from
Closed

Added optimizations specified in #2 #9

wants to merge 1 commit into from

Conversation

rameel
Copy link

@rameel rameel commented Mar 2, 2018

See: #2
Added optimizations like using 'indexOf' and an array of the arguments as opposed to the arguments object which can't be optimized by V8 and leaks. Moved the declaration of 'mergeFn' to the top of the file because of hoisting.

Added optimizations like using 'indexOf' and an array of the arguments as opposed to the arguments object which can't be optimized by V8 and leaks. Moved the declaration of 'mergeFn' to the top of the file because of hoisting.
@yyx990803
Copy link
Member

Does this actually make it faster? Are there benchmarks?
If we want to optimize the lookup, object with keys should be even faster than indexOf on an Array.

@rameel
Copy link
Author

rameel commented Mar 2, 2018

Oh, really, after a quick check, the original code works much faster than the optimized 😆 My bad

@rameel rameel closed this Mar 2, 2018
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.

None yet

2 participants