SLC: Make `Vector` the default implementation of `Seq` instead of `List`

Does the SIP committee have to obey its own precedent ?
Especially across features and time

6% on such a test with such high variability depending on the project and usage is a measurement error.

6% on unsigned Integers which are trivial to benchmark with low variance is significant.

It is not the same.

1 Like

Probably not. I am unaware of any guidelines in that direction. But it would make decisions more credible i guess.

True, they are not. An other difference is that you can choose if you want to take the performance hit by using unsigned integers or not. With the proposed transformation you are just hit by it if you code is already using default Seq.

Hi everybody! I wanted to report a negative result here, because I found the result fascinating.

As some of you may have seen, a week or two ago I published an experimental collections library, farray — an immutable, Array-backed sequence with O(1) structural ops (via lazy nodes over flat leaves), no boxing of primitives, name-based ::/+: extractors, and a fusion macro. I chose its main properties in part because I was convinced they’d be an ideal fit for the Scala 3 compiler: covariance (FArray[+A], like List), dedicated special-casing for length 0 and 1 (a shared empty singleton and a one-field leaf), unboxed flat storage, and O(1) ++/+:/take/drop. Given everything I thought I knew about JVM performance, I was fully convinced that replacing List with FArray throughout the compiler would be a large, obvious win.

It wasn’t.

The whole experiment was driven by Claude Fable, so it only made sense that Claude would summarize it as well. I know i had a lot of fun experimenting with this, and i think the conclusion is fairly strong (and surprising to me!)
Experiment summary gist

7 Likes

Reaching out to others yourself is never a waste of time !

I skimmed through it and it seems interesting

Thanks for trying this out!