Immutable

Idx.I is an Immutable Indexed Collection trait with following implementations: Ints, Longs, Shorts, Doubles, Floats, Bytes, Chars, Booleans, and Refs

All are implemented as AnyVal Array wrap with no mutation methods, so the collections memory footprint is just an Array itself

Easiest way to create an immutable collection is from a Stream:

val c : Chars        = ('a' <> 'z').all.toRaw[Chars]

val i : Ints         = (1 <> 10000).all.toRaw[Ints]

val r : Refs[String] = (1 <> 10000).map("string" + _).all.to[Refs]

Generally Idx.I grow performance correlates with the performance of Array itself, and it is drastically different when building small and large collections