• Felix Lange's avatar
    trie: reduce hasher allocations (#16896) · e8ea5aa0
    Felix Lange authored
    * trie: reduce hasher allocations
    
    name    old time/op    new time/op    delta
    Hash-8    4.05µs ±12%    3.56µs ± 9%  -12.13%  (p=0.000 n=20+19)
    
    name    old alloc/op   new alloc/op   delta
    Hash-8    1.30kB ± 0%    0.66kB ± 0%  -49.15%  (p=0.000 n=20+20)
    
    name    old allocs/op  new allocs/op  delta
    Hash-8      11.0 ± 0%       8.0 ± 0%  -27.27%  (p=0.000 n=20+20)
    
    * trie: bump initial buffer cap in hasher
    e8ea5aa0
hasher.go 6.84 KB