On 05/26/2017 05:10 AM, Patrick Schluter wrote:

> in C, where sorting is done via the qsort() function. The comparison
> function must be provided by a function pointer. This means that the
> qsort function must call a function for doing even the simplest
> comparison.

For example, Stroustrup has the article "Learning Standard C++ as a New Language"[1]. It compares sorting performance of C to C++ in section 3, "Efficiency". With those old C and C++ compilers he used (in May 1999), C++ was 1.74 to 4.62 times faster than C.

Ali

[1] http://www.stroustrup.com/new_learning.pdf

Reply via email to