What would be the best Scala collection (in version 2.8+), mutable or immutable, for the following scenario:
- Sequential ordering, so I can access elements by position (Seq)
- You need to insert elements often, so the collection should be able to grow without much penalty
- Random access, it is often necessary to delete and insert elements into arbitrary indexes in the collection
Currently, I seem to be getting good performance with a mutable ArrayBuffer, but is there anything better? Is there an indisputable alternative that will do? Thanks in advance.
source share