August 18, 2019
Recently I’ve been working with Scala. Scala’s collections api is much richer than Java’s and offers mutable and immutable implementations for most of the common collection types. I’ve always been interested in algorithm and data structure performance so I decided to run some benchmarks to see how the collections performed. I was most interested in the relationship between mutable and immutable collections.
TL;DR - The mutable ArrayBuffer offers brilliant performance for tail additions, sequential and random access; beating everything else in my tests.