Fantom-foundation / lachesis-rs

Lachesis BFT consensus for permission-less networks, in Rust
MIT License
34 stars 5 forks source link

Use rayon where possible #8

Open AgustinCB opened 6 years ago

AgustinCB commented 6 years ago

There're a lot of of .iter and .into_iter that would be replaced by the alternatives proposed by Rayon. We should use it.

rishflab commented 6 years ago

I think using par_iter everywhere may not always result in performance increase due cache/memory overhead. I think we need to consider how we implement concurrency/parrellism at an archtectural level.

There are many approaches we could take : tokio-rs, rayon, shred etc...

Maxime2 commented 5 years ago

Implementing iterators we should remember the events must be processed in topological order in divideRounds(), decideFame() and findOrder(), according to Swirlds paper. So any implementation must not break that order.

AgustinCB commented 5 years ago

Yeah, we should be using rayon only where order isn't relevant.