2 ms·
It's using a qsort-like interface using a function pointer for the comparison - surely a C++ like implementation has a lot to gain here?
by kzrdude 5y ago
It's using a qsort-like interface using a function pointer for the comparison - surely a C++ like implementation has a lot to gain here?
- scandum 5y agoCorrect, if you uncomment //#define cmp(a,b) (*(a) > *(b)) in blitsort.h it'll run about 25% faster. Probably still slower than a native C++ implementation since it'll evaluate to (a > b) > 0 rather than (a > b), not sure if the compiler will optimize that.