Skip to content

WilleBerg/faaa_queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A fast concurrent lock-free queue for Rust.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages