A Java library for creating high-performance, memory-efficient heterogeneous collections of primitive values with on-heap or off-heap storage.
FastTuple is a Java library that generates heterogeneous collections of primitive values with adjacent memory layout, either on-heap or off-heap. It solves the performance problems caused by primitive boxing in the JVM, such as broken locality of reference and increased garbage collection pressure, by ensuring data is stored contiguously for optimal cache efficiency.
Java developers working on high-performance, data-intensive applications, such as financial systems, real-time analytics, or low-latency services, where memory efficiency and reduced GC pauses are critical.
Developers choose FastTuple for its ability to drastically improve memory locality and reduce garbage collection overhead through bytecode-generated, schema-defined tuples. Its support for off-heap storage and pooling makes it uniquely suited for scenarios where traditional Java collections fall short on performance.
FastTuple is a Java library designed to overcome the performance limitations of primitive boxing in the JVM by generating heterogeneous collections of primitive values that are laid out adjacently in memory. It addresses issues of memory locality and garbage collection pressure, making it suitable for high-performance computing and data-intensive applications.
FastTuple prioritizes performance and memory efficiency by minimizing JVM overhead, leveraging bytecode generation to create optimized data structures that respect hardware memory hierarchies.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Stores primitive values contiguously in memory to improve access speed, with benchmarks showing operations in the hundreds of thousands per millisecond for pre-allocated tuples.
Supports both heap and off-heap allocation, including cache line padding for off-heap tuples to avoid false sharing in concurrent environments, as demonstrated in usage examples.
Includes tuple pooling mechanisms to minimize garbage collection pressure, with performance tests showing pooled access methods achieving tens of thousands of ops/ms.
Generates bytecode at runtime based on user-defined schemas, allowing for optimized data structures without compile-time knowledge, enabling custom primitive collections.
Requires manual installation of Janino dependencies not available on Maven Central, adding friction to the build process as detailed in the building section.
Currently only supports primitive types, with String support planned for a future release, restricting use cases to numeric and boolean data.
Off-heap tuples must be explicitly destroyed to prevent memory leaks, increasing developer responsibility and error risk, as warned in the direct allocated tuples example.
Bytecode generation at runtime can introduce initialization delays and may not be suitable for environments with strict performance constraints on startup or frequent schema changes.