Arrays - Fast and versatile arrays with swappable implementations

I have added some graphs to the benchmarking post above.

Some interesting observations:

  • The O(n) behaviour of lists on appends, random reads and random updates can clearly be seen.
  • For most operations, MapArray and ErlangArray perform very similarly, one only being a constant factor faster than the other. Only when collections become really large are ErlangArrays usually more performant.
  • Once we have more than ~16000 elements, performance for random access, random updates and appends drops drastically. I expect that this is caused because of the collection no longer fitting in the cache lines all at once.
5 Likes