You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SuperLinq FindIndex operation could detect if the underlying type is one of these and call the native implementation as an optimization.
Currently, benchmarks shows that calling someList.ToList().FindIndex(predicate) is actually faster than the SuperLinq implmentation, although of course it allocates a lot more memory.
Invoking the underlying method would provide better performance and avoid the memory allocation of calling ToList() to get access to the faster FindIndex method.
The text was updated successfully, but these errors were encountered:
Treit
changed the title
Consider optimizations to IndexOf based on the underlying type
Consider optimizations to FindIndex based on the underlying type
Oct 23, 2024
List<T>
andT[]
support a FindIndex operation.The SuperLinq FindIndex operation could detect if the underlying type is one of these and call the native implementation as an optimization.
Currently, benchmarks shows that calling
someList.ToList().FindIndex(predicate)
is actually faster than the SuperLinq implmentation, although of course it allocates a lot more memory.Invoking the underlying method would provide better performance and avoid the memory allocation of calling
ToList()
to get access to the fasterFindIndex
method.The text was updated successfully, but these errors were encountered: