faaa_queue

Crates.iofaaa_queue
lib.rsfaaa_queue
version1.0.0
created_at2025-06-18 10:31:37.272764+00
updated_at2025-06-22 10:25:36.332306+00
descriptionA really fast unbounded lock-free concurrent queue.
homepagehttps://github.com/WilleBerg/faaa_queue
repositoryhttps://github.com/WilleBerg/faaa_queue
max_upload_size
id1716847
size825,713
William Berg (WilleBerg)

documentation

README

Description

A very fast concurrent lock-free queue.

faaa_queue is a Rust implementation of the FAAAQueue.

Usage

use faaa_queue::FAAAQueue;

fn main() {
    let q: FAAAQueue<i32> = FAAAQueue::new();
    q.enqueue(1);
    assert_eq!(q.dequeue(), Some(1));
}

Performance

The faaa_queue was benchmarked using the rusty-benchmarking-framework.

It performs a lot better than all other concurrent queues benchmarked after 4 threads.

Benchmark results

Here are results from three different benchmarks using varying tau (τ) values to control the enqueue/dequeue ratio.

Benchmark Setup: Threads are synchronized to start simultaneously, with each thread alternating between enqueue and dequeue operations based on a random number r ∈ [0,1) - enqueueing when r > τ, dequeueing otherwise. Additional random operations simulate realistic workloads between each queue operation.

For implementation details, see the rusty-benchmarking-framework.

Commit count: 18

cargo fmt