An Elixir library extending the standard library with high-performance persistent vectors, ordered maps, and optimized Enum functions.
Aja is an Elixir library that extends the standard library with high-performance data structures like persistent vectors and ordered maps, along with optimized utility functions. It solves the problem of inefficient data manipulation in Elixir by providing alternatives to lists and maps that offer better performance characteristics for specific operations.
Elixir developers working on performance-sensitive applications, those needing ordered map functionality, or anyone looking for more efficient data structures than standard lists and maps.
Developers choose Aja because it provides well-documented, consistent APIs that integrate seamlessly with Elixir's ecosystem while offering significant performance improvements for data manipulation tasks, especially when working with large datasets.
Extension of the Elixir standard library focused on data stuctures, data manipulation and performance
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Aja.Vector provides constant-time appends and random access, benchmarked to outperform Erlang's :array module and offer faster operations than lists for many Enum functions.
Aja.OrdMap maintains insertion order for any key type, addressing a gap in Elixir's standard library where only keyword lists offer order but with performance and key-type limitations.
Aja.Enum delivers highly optimized functions for Aja's data structures, often speeding up operations on large collections compared to the standard Enum module, as highlighted in benchmarks.
APIs are consistent with Elixir's core library, implementing protocols like Enumerable and Access, and offering convenience macros like Aja.vec/1 for easy adoption and pattern matching.
The project explicitly states it's still early with breaking changes expected, making it risky for production use without careful versioning and testing.
Aja.OrdMap has decent overhead in write operations and memory usage compared to plain maps, as extra work is needed to maintain insertion order, which can impact performance-critical scenarios.
Vectors optimize for fast runtime at the expense of compile time, which may slow down development cycles in projects with frequent builds or tight deployment schedules.