Re:Less is exponentially more (2012)
by RogerL on Friday September 20, 2013 @09:05PM
(#6421479)
Templates do help with performance. Look up the performance characteristics of qsort (C) vs std::sort (templatized C++ sort).
[ Parent
| on HN ]
I tested both extensively lately and the performance was exactly the same (under Intel Compiler and Visual Studio) so probably those compilers found a way to optimize it. They both are much slower than hand coded version anyway so it doesn't really matter (link to implementation which beats standard qsort/std::sort performance by 2x/3x times (at least on my data): http://www.ucw.cz/libucw/doc/sort.html).