Is there a lower-latency way of responding to an event than spinning/busy-waiting?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • tokio-uring

    An io_uring backed runtime for Rust

  • So back to the title: is there a lower-latency way of responding to an event than spinning/busy-waiting? Or more generally, what's the fastest possible way to respond to an I/O event? I have never played with io_uring but this Tokio RFC looks promising. Could io_uring be faster than busy-polling? Or can busy-waiting be used on top of io_uring?

  • sleeping_vs_spinning

    Benchmarks to measure the cost of sleeping

  • All the code is available on GitHub: https://github.com/felix-pb/sleeping_vs_spinning

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • tokio

    A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

  • Asynchronous Rust (e.g. with Tokio) is great for dealing with a large number of events (e.g. for web servers), but here I am specifically asking about how to respond as fast as possible to a small number of events (e.g. one event at a time every 100ms). I wrote a simple benchmark for 3 common abstractions in Rust's standard library:

  • core-isolation

    Presentation at Lund LinuxCon 2017

  • You might be interested in my presentation about low latency audio here: https://github.com/diwic/core-isolation

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts