Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
cnity
on April 12, 2023
|
parent
|
context
|
favorite
| on:
Deduplicate a slice in Go, use sort or a map?
Cache is one thing, but also you don't need to repeatedly perform hash functions. Array index lookup is of course far faster than map lookup.
preseinger
on April 13, 2023
[–]
also doing those map lookups twice per iteration, for some reason
cnity
on April 13, 2023
|
parent
[–]
Seems likely to be optimised by the compiler, not sure though.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: