I collect parsed samples with var samples = List.empty[Double] and samples = samples :+ value in a loop, then read them back by index with samples(i). At 200,000 samples the program spends most of its time in these two operations. A colleague suggested Vector; the API documentation mostly talks about Seq.
What are the performance characteristics of these types, and which should be the default choice?




