A high-performance C++ thread pool and parallel algorithms library for compute-bound workloads, designed as a sanitizer-clean alternative to OpenMP and TBB.
Dispenso is a high-performance C++ library for parallel computing, providing work-stealing thread pools, parallel algorithms, futures, and concurrent containers. It solves the problem of efficient, scalable concurrency for compute-bound tasks, offering better nested parallelism and sanitizer compatibility than alternatives like OpenMP and Intel TBB.
C++ developers building performance-critical applications that require fine-grained control over parallel execution, such as scientific computing, game engines, or data processing pipelines.
Developers choose Dispenso for its superior performance in nested parallel loops, full compatibility with sanitizers like ASAN/TSAN, and explicit thread pool management, which prevents thread explosion and oversubscription common in other libraries.
The project provides high-performance concurrency, enabling highly parallel computation.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Dispenso's work-stealing thread pool prevents thread explosion in nested loops, delivering 32-50% speedups in production workloads after porting from TBB, as highlighted in benchmark results.
Fully compatible with ASAN/TSAN, unlike many TBB versions, making it ideal for debugging concurrent C++ code without sanitizer issues.
Provides explicit thread pool management, avoiding implicit global state and offering better control over resource usage, which is emphasized as a key advantage over OpenMP and TBB.
Based on C++14 with optional C++20 concept constraints, it's portable across platforms without compiler-specific extensions, and includes a std::experimental::shared_future-like API for thread-safe futures.
Designed exclusively for compute-bound tasks; not suitable for I/O-heavy workloads or GPU acceleration, lacking CUDA graph mappings that libraries like TaskFlow offer.
Has known test failures on 32-bit PPC Mac, and Windows benchmarks are a work in progress (TODO in README), indicating potential platform-specific instability or incomplete testing.
As a newer library from Meta's incubator, it has a smaller community and fewer third-party integrations compared to established alternatives like TBB or OpenMP, which might affect long-term support and tooling.
dispenso is an open-source alternative to the following products:
Intel Threading Building Blocks (TBB) is a C++ template library for parallel programming that provides a higher-level, task-based parallelism model to simplify writing scalable applications.
OpenMP is an API specification for parallel programming on multi-core processors, providing compiler directives, library routines, and environment variables for shared-memory parallel programming in C, C++, and Fortran.