Skip to content

Conversation

@holiman
Copy link
Contributor

@holiman holiman commented Dec 16, 2019

This is a very dirty attempt to see how much faster it would be to hash the trie if we use some more goroutines. This poc uses four threads, and becomes ~35% faster (than #20461).

[user@work trie]$ benchstat noparalell_hash.txt parallell_4_hash.txt 
name    old time/op    new time/op    delta
Hash-6    4.34µs ±12%    2.82µs ± 7%  -35.06%  (p=0.000 n=10+9)

name    old alloc/op   new alloc/op   delta
Hash-6      673B ± 0%      683B ± 0%   +1.37%  (p=0.000 n=9+9)

name    old allocs/op  new allocs/op  delta
Hash-6      9.00 ± 0%     10.00 ± 0%  +11.11%  (p=0.000 n=10+10)

Some early attempt showed roughly similar figures for two threads, so there doesn't seem to be much gain in further increasing the threads.

And yes, the code is butt ugly, and also breaks some other usecases (like, creating proofs). Do we think this is worth pursuing? If so, I can make a stab at doing it properly.

@holiman holiman mentioned this pull request Dec 26, 2019
@holiman
Copy link
Contributor Author

holiman commented Jan 4, 2020

Closing in favour of #20488

@holiman holiman closed this Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant