|
|
|
|
|
by sreque
5788 days ago
|
|
Speed increases like those explained in http://www.tilander.org/aurora/2007/12/comparing-stdsort-and..., which compares qsort to std::sort. Because templates are basically automated code copy-paste, the compiler can more easily inline at compile-time. Unfortunately, it also translates to lots more compiled code, which means slower compile times and fatter binaries. Still, writing something like the STL library in C with the same performance characteristics would be much more difficult, if not impossible. I'm not a C++ expert, but that's my understanding of things, at least. |
|