A Java library providing high-performance mutable and immutable data structures with functional semantics, efficient batch operations, and custom equality.
Bifurcan is a Java library that provides high-performance mutable and immutable data structures with functional semantics. It solves the problem of balancing safety and performance in concurrent environments by offering collections that return new instances on updates, while optimizing batch operations like union and intersection. The library includes unique features like inverted indices and efficient splitting/merging for parallel processing.
Java developers building high-performance applications requiring safe concurrency, such as data processing pipelines, concurrent algorithms, or systems needing efficient batch operations on large collections.
Developers choose Bifurcan for its combination of functional safety and performance, with optimized batch operations that outperform other libraries, customizable equality semantics, and the flexibility of linear/forked modes for temporary mutability without sacrificing immutability's benefits.
functional, durable data structures
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show Bifurcan's union, intersection, and difference operations significantly outperform other libraries, as detailed in its in-depth comparison documentation.
Updates return new collections, enabling thread-safe sharing and local reasoning without side effects, which is core to its design philosophy.
Contiguous memory layout allows iteration over map entries to be up to 20x faster than java.util.HashMap for large collections, as cited in benchmark images.
Linear and forked modes provide temporary mutability for performance gains in linear dataflows, balancing safety and efficiency without full immutability overhead.
Maps and sets support custom hash and equality semantics, allowing tailored behavior beyond standard Java collections, as seen in LinearMap and Map implementations.
The library explicitly excludes lazy sequences or streams, limiting use for control flow scenarios that require deferred evaluation, as admitted in the 'no lazy collections' section.
Bifurcan uses its own interfaces (IList, IMap, ISet) instead of java.util collections, requiring conversion via toMap()/toList() methods and potentially breaking interoperability with standard Java libraries.
Splitting and merging for parallelism require manual integration of execution models, adding development overhead compared to libraries with built-in parallel collections, as noted in the separation of concerns design.
Version 0.2.0-rc1 indicates it's a release candidate, so it may have breaking changes, limited documentation, and a smaller ecosystem compared to stable alternatives.