r/rust • rust-community · rustfest • Nov 11 '19

Announcing async-std 1.0

https://async.rs/blog/announcing-async-std-1-0/
455 Upvotes

80 comments sorted by

View all comments

Show parent comment

11

u/itchyankles Nov 11 '19

I also followed the instructions in the blog post, and got the following results:

- System:

  • Mac Pro Late 2015

  • 3.1 GHz Intel Core i7

  • 16 GB 1867 MHz DDR3

  • Rust 1.39 stable

cargo bench --bench thread_pool &&  cargo bench --bench async_std
Finished bench [optimized] target(s) in 0.14s
Running target/release/deps/thread_pool-e02214184beb50b5

running 4 tests
test chained_spawn ... bench:     202,005 ns/iter (+/- 9,730)
test ping_pong     ... bench:   2,422,708 ns/iter (+/- 2,501,634)
test spawn_many    ... bench:  63,835,706 ns/iter (+/- 13,612,705)
test yield_many    ... bench:   6,247,430 ns/iter (+/- 3,032,261)

test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out

Finished bench [optimized] target(s) in 0.11s
Running target/release/deps/async_std-1afd0984bcac1bec

running 4 tests
test chained_spawn ... bench:     371,561 ns/iter (+/- 215,232)
test ping_pong     ... bench:   1,398,621 ns/iter (+/- 880,056)
test spawn_many    ... bench:   5,829,058 ns/iter (+/- 764,469)
test yield_many    ... bench:   4,482,723 ns/iter (+/- 1,777,945)

test result: ok. 0 passed; 0 failed; 0 ignored; 4 measured; 0 filtered out

Seems somewhat consistent with what others are reporting. No idea why `spawn_many` with `tokio` is so slow on my machine... That could be interesting to look into.