• Felix Lange's avatar
    consensus/ethash: reduce keccak hash allocations (#16857) · 3f33a7c8
    Felix Lange authored
    Use Read instead of Sum to avoid internal allocations and
    copying the state.
    
    name                      old time/op  new time/op  delta
    CacheGeneration-8          764ms ± 1%   579ms ± 1%  -24.22%  (p=0.000 n=20+17)
    SmallDatasetGeneration-8  75.2ms ±12%  60.6ms ±10%  -19.37%  (p=0.000 n=20+20)
    HashimotoLight-8          1.58ms ±11%  1.55ms ± 8%     ~     (p=0.322 n=20+19)
    HashimotoFullSmall-8      4.90µs ± 1%  4.88µs ± 1%   -0.31%  (p=0.013 n=19+18)
    3f33a7c8
Name
Last commit
Last update
..
clique Loading commit data...
ethash Loading commit data...
misc Loading commit data...
consensus.go Loading commit data...
errors.go Loading commit data...