zeropool 0.4.0

High-performance buffer pool with constant-time allocation, thread-safe operations, and 5x speedup over bytes crate
Documentation
//! Multi-threaded get/put profiling target for callgrind (4 threads).

use std::hint::black_box;
use std::thread;
use zeropool::BufferPool;

fn main() {
    let pool = BufferPool::builder().min_buffer_size(0).build();

    let handles: Vec<_> = (0..4)
        .map(|_| {
            let p = pool.clone();
            thread::spawn(move || {
                for _ in 0..500_000 {
                    let buf = p.get(black_box(65536));
                    drop(black_box(buf));
                }
            })
        })
        .collect();

    for h in handles {
        h.join().unwrap();
    }
}