-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Refine _.pick #2065
Refine _.pick #2065
Conversation
Any advantage to this refactor? Did |
It was a lot of duplicated code between the two branches to support an inline 173a7fa fixed issues with adding new keys as you're iterating, but it created linting errors (duplicate I think this wraps up all the removals changes from 1.8 to 1.8.1. I can't spell anymore, time for bed. 😴 |
I tried a similar refactor before for reference #1639. Had heavy perf hits for the |
That's probably because of Line 903. The only perf hit this should take is invoking (and this is sure to be inlined) in the var iteratee = function(value, key, object) {
return key in object;
}; |
3ac5d3b
to
b47c21a
Compare
Can you post benchmarks when you get a chance
|
Unfortunately, it's a bit slower for the |
That's a weird optimization, no? |
Are you talking about #2068? |
Not sure how this’ll do performance wise. I’ll write a jsperf tomorrow.