Skip to content

Conversation

@michaelsproul
Copy link
Member

This is an experimental PR to try using Tokio in place of Rayon. Tokio also uses a work-stealing thread pool for execution, but has better support for mutexes and locks (see rayon-rs/rayon#592).

It turns out that these better locks come with significantly higher overhead, and tree hashing runs 3-4x slower on Tokio than it does on Rayon: 140ms (tokio) vs 40ms (rayon).

This branch needs to be compiled with tokio_unstable enabled:

RUSTFLAGS="--cfg tokio_unstable" cargo bench -- async_tree_hash_root_list

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.

2 participants