top | item 41276121

(no title)

barsonme | 1 year ago

> IMO it is a questionable decision to spend CPU resources on randomization …

It takes about 3 ns to choose a random starting bucket, which is basically free relative to the iteration itself.

discuss

order

tgv|1 year ago

Isn't the trick that the runtime picks another hash-constant every time?

masklinn|1 year ago

Aside from keying the hash function, Go specifically randomises the start offset of each map iteration.