4 ms·
Unfortunately, Scala’s vector type actually sucks big time in regards to performance: http://www.lihaoyi.com/post/BenchmarkingScalaCollections.html http://www.
by mruts 7y ago
Unfortunately, Scala’s vector type actually sucks big time in regards to performance:
http://www.lihaoyi.com/post/BenchmarkingScalaCollections.html http://www.lihaoyi.com/post/BenchmarkingScalaCollections.htm...
Moreover if you want random access just use Arrays (especially now that 2.13 has immutable ones). The only use case for Vector is when you don’t know the collection size up front and need random access. Though even then it honestly might just be a better idea to build up a list and then convert it to an array.