Re:Go is not an easy language
by nemo1618 on Monday February 22, 2021 @01:07AM
(#26221370)
> Giving maps a runtime penalty of random iteration in order just to punish devs who don't read docs is annoying
Can you explain what you mean by "runtime penalty?" Last I checked, the iteration is only random wrt its starting offset; after that, it proceeds linearly through the buckets. So you only generate one random integer per `range`, which seems acceptably cheap.
Can you explain what you mean by "runtime penalty?" Last I checked, the iteration is only random wrt its starting offset; after that, it proceeds linearly through the buckets. So you only generate one random integer per `range`, which seems acceptably cheap.