Extreme Cleverness: Functional Data Structures in Scala
From OO to Clojure Workshop!
Watch my free workshop to help you learn Clojure faster and shift your paradigm to functional.
According to Daniel Spiewak, Clojure's vec requires, in the worst case, 7 array accesses and 14 bit operations.
On really large datasets---this just astonished me when I discovered it---on really large datasets this data structure [Clojure vec] beats java.util.ArrayList for lookup. It beats java.util.ArrayList for datasets that are in the 2 billion range. That is incredibly fast. java.util.ArrayList is an array, right? And we're beating an array.