C++ templates for performance? [closed]
A common example is sorting. In C, qsort takes a pointer to a comparison function. Generally speaking, there will be one copy of the qsort code, which is not inlined. It will make a call through the pointer to the comparison routine — this of course is also not inlined. In C++, std::sort is a … Read more