[go-nuts] Re: Performance of byte-arrays as map keys

2023-03-29 Thread Amit Lavon
Thank you! Now it makes sense to me. On Monday, March 27, 2023 at 5:50:02 PM UTC+3 Keith Randall wrote: > Key sizes 4 and 8 have special case hashing code. > They are intended for int32, int64, and pointers, but your [4]byte and > [8]byte take advantage of it as well. > > On Sunday, March 26,

[go-nuts] Re: Performance of byte-arrays as map keys

2023-03-27 Thread 'Keith Randall' via golang-nuts
Key sizes 4 and 8 have special case hashing code. They are intended for int32, int64, and pointers, but your [4]byte and [8]byte take advantage of it as well. On Sunday, March 26, 2023 at 3:05:52 AM UTC-7 Amit Lavon wrote: > Hi gophers, > > Some code I am writing uses byte-arrays ([X]byte) as