risechain / pevm

Blazingly fast Parallel EVM
MIT License
230 stars 47 forks source link

Better thread management #309

Open hai-rise opened 2 months ago

hai-rise commented 2 months ago
byhashdong commented 1 month ago

@hai-rise Why rayon has a poor performance, what's the bottleneck?

hai-rise commented 1 month ago

@byhashdong I didn't have time to inspect; just replaced thread::scope with rayon::scope and saw the benchmarks got much slower. I'd love to add a rayon thread pool to the new Pevm struct (didn't exist back then) and retry it. Kinda similar to how Aptos's doing it: https://github.com/aptos-labs/aptos-core/blob/f8eef74f9f712fcc0e809265ec2b77013a683184/aptos-move/block-executor/src/executor.rs#L72

I can create a dedicated issue for the experiment if you're interested in it 🙏.

byhashdong commented 1 month ago

Sure, I would like to study it. Please assign it to me!