feature: Use a Set to check for uniqueness in Array #2367
aarontravass
started this conversation in
Feature Ideas
Replies: 1 comment
-
I'm moving this to the discussion tab, as we are trying to keep the issue count low. Please see this issue for an explanation. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The current
@ArrayUnique
uses a filter based method to compare objects. This is anO(n^2)
solutions. The JS spec for Set states thatHence, I believe it would be more performant to use a Set based approach to check for uniqueness.
Proposed solution
Something as simple as
Beta Was this translation helpful? Give feedback.
All reactions