Aja - Data structure and utility library for Elixir

What would Elixir feel like if lists let you append or access any element efficiently, like you would do in python or any imperative language?

Clojure, which is also a functional language, makes its persistent vector one of its selling points, precisely because vectors can perform many operations in effective constant time.

This has been a tough challenge and I went through several failed attempts, but I’m happy to announce that A.Vector is now available in Aja, since version 0.4!

While there is still work to be done especially regarding optimization, the performance of this early version already shows great promise: most “enumerable” functions are much faster than erlang’s :array, and some are even slightly faster than their List / Enum’s counterparts.

My motivation and hope is that vectors could make it more straigthtforward to write some of the more algorithm-heavy parts of business logic code. And maybe it can make the transition easier for beginners coming over from imperative languages and who struggle with some of the limitations of linked lists. I’m looking forward to hearing your thoughts!

9 Likes