News for hackers. Stuff that matters.
Re:Linus Torvalds on C++ by cygx on Tuesday February 28, 2012 @05:04AM (#3642622)
One of the reasons for the performance difference is that you can't inline into the libc DLL blob: If you use qsort(), you'll get a lot of overhead from calling the comparison function.

If you use a custom quicksort implementation and put it into the same translation unit as the comparison function (or compile statically and use link-time optimizations with a sufficiently advanced compiler) you can get the same performance out of C.

Re:Linus Torvalds on C++ by cageface on Tuesday February 28, 2012 @05:43AM (#3642685)
Function call overhead is only one of the issues with the C version based on void pointers.

Check out Stroustrup's keynote at Going Native 2012 for more details: http://channel9.msdn.com/Events/GoingNative/GoingNative-2012...