ArraySlice<T> versus Slice<Array<T>>

ArraySlice<T> (4 words) is larger than Slice<Array<T>> (3 words) and has worse code gen in many cases.

Is there any path to changing the return type of Array's unlabeled subscripts?

1 Like

No. This would be source- and binary-breaking. There is a path to improving the codegen for ArraySlice, however (especially if you report bugs for the bad cases you find)!

ArraySlice codegen is also a source of annoyance for me, by the way, but happily one that a number of folks are interested in fixing.