Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upimprove .unique performance #184
Comments
This comment has been minimized.
This comment has been minimized.
I'm sure they would accept a PR for it if you have a chance. |
This comment has been minimized.
This comment has been minimized.
It's a breaking change on complex objects/arrays. |
This comment has been minimized.
This comment has been minimized.
In the pull request I've also taken care of the key param for objects and I still see a performance improvement, could you check that ? |
This comment has been minimized.
This comment has been minimized.
That's a change of behavior nonetheless, I'm not saying it's not good, it just should be a new major. |
This comment has been minimized.
This comment has been minimized.
Yes, my thoughts also, to few tests on this On Tue, Apr 5, 2016, 13:02 Nicolas Morel notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
Looks like this raises that old issue as well where it doesn't handle |
This comment has been minimized.
This comment has been minimized.
I wouldn't expect this function to do data transformations, user must be Catalin Tanasescu Telefon: 0722739074 On Tue, Apr 5, 2016 at 3:26 PM, David Pate notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
(Just to be explicit) I assume everyone is alluding to the fact that a |
This comment has been minimized.
This comment has been minimized.
Someone should just check where this is used in hapi and make sure it won't cause issues. |
This comment has been minimized.
This comment has been minimized.
hapi itself only uses |
This comment has been minimized.
This comment has been minimized.
doing
also quick github search resulted only in Joi (inert and subtext use uniqueFileName) |
This comment has been minimized.
This comment has been minimized.
I can verify that joi uses |
This comment has been minimized.
This comment has been minimized.
updated pull request with more tests, let me know if I can further improve this, thanks! |
When not sending a key , we could you the new ES6
Set
feature, it delivers a ~2x
speed performancehttp://jsperf.com/array-unique-hoek-vs-es6