oneshot icon indicating copy to clipboard operation
oneshot copied to clipboard

Add automatic benchmarking comparisons between other channels

Open faern opened this issue 5 years ago • 0 comments

Even if correctness and API niceness is the most important, speed is what sells :)

Write benchmarks that performs some common channel operations and compare the times between oneshot and a number of other popular channels. Of course good to compare with other oneshot channel types, but since normal channels can be used for single messages it makes sense to compare with those as well

  • std::sync::mpsc::channel() - Is not locked to be oneshot only. But it has a special oneshot mode active until the channel is used for multiple messages.

Oneshot channels

  • futures::channel::oneshot::channel() - has try_recv otherwise can only receive async.
  • tokio::sync::oneshot::channel - has try_recv otherwise can only receive async.

Other channels it might make sense to compare with

  • crossbeam_channel::bounded(1)
  • async_std::sync::channel(1)

faern avatar Apr 28 '20 22:04 faern