jackmott / LinqFaster

Linq-like extension functions for Arrays, Span<T>, and List<T> that are faster and allocate less.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] SumS (etc) to work on List<T> please

Smurf-IV opened this issue · comments

[Enhancement] SumS (etc) to work on List please

it isn’t possible without extremely unsafe code. to expand on this, you can get at the array inside of the List using some hacks, but it isn't guaranteed to work on all implementations of .NET, or future implementations. If you really need growable array behavior with simd features, best thing to do is just copy the source to List, and make the array public.

Duplicate of #15