EamonNerbonne / anoprsst

Sorts Span<T> and arrays more quickly than Array.Sort
23 stars 4 forks source link

Add utility overloads to more efficiently sort common special cases #2

Open EamonNerbonne opened 5 years ago

EamonNerbonne commented 5 years ago

i.e. to sort doubles via a < b || !(a >= b) instead of IComparable, which is considerably faster.

EamonNerbonne commented 5 years ago

added float+double, since those clearly matter; but only statically - I'm not sure the runtime hit of a dynamic check for the generic case is worth it.