3 ms·
For a long time Go did not expose their super efficient internal map hashing algorithm that, if possible, would use AES instructions from the processor to hash
by tomalaci 3y ago
For a long time Go did not expose their super efficient internal map hashing algorithm that, if possible, would use AES instructions from the processor to hash even faster. That is, they did not expose it as an official API. People usually did some "unsafe" usage to link to that internal hashing function for their own super-fast map implementations.
That was changed some time ago. They released official maphash package: https://pkg.go.dev/hash/maphash https://pkg.go.dev/hash/maphash
Otter author could probably look into replacing their 3rd party hashing dependency (https://github.com/dolthub/maphash https://github.com/dolthub/maphash) with the official one and knock off an unneeded dependency :)
- tedunangst 3y agohash/maphash isn't a very good replacement if you're trying to hash simple structs, since they still require conversion to byte slice by some means.