Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> One thing that stood out to me when doing so was a call I made to remove duplicate values from an array/slice of uint64. A fairly simple fuction that appeared often enough in the output.

But do those arrays need to contain duplicates, or the code can be changed elsewhere to not generate them?



The values come from the result of many hash functions.

I actually need them sorted as well hence they are added to an array, and deduplicated.

I had a look and didn’t see any obvious way to eliminate them hence the initial function, and the subsequent faster one.


Only you can decide that, but it's always worth the ask IMO.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: