mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
e21c665e70
Use binary.LittleEndian directly instead of going through the binary.Write indirection. This allows the following optimizations to occur: - We can reuse our own byte slice between iterations - We don't have to put g.ID in an interface value - h doesn't escape - PutUint32 gets inlined On top of that, the argument to maphash.Hash.Write doesn't escape, so b doesn't move to the heap. Signed-off-by: Dominik Honnef <dominik@honnef.co>