Commit 6515720
perf: optimize removeUniq with Set lookup
Replaces O(N*M) linear search with O(N+M) Set lookup in removeUniq function.
Benchmark showed ~20x improvement (12.3s -> 0.6s) for 10k items.
Co-authored-by: jaruesink <4207065+jaruesink@users.noreply.github.com>1 parent 33ac356 commit 6515720
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
0 commit comments