News for hackers. Stuff that matters.
Re:Fastest table sort in the West – Redesigning DuckDB's sort by dragontamer on Friday August 27, 2021 @05:32PM (#28333201)
Hmmm.

std::sort is a template in C++. Which means that in most cases, I'd expect std::sort to inline the comparator and not have any function call overhead at all. (And even further: that the optimizer can make optimizations to std::sort + comparator together since they've been inlined)

So you have a good point. Function overhead is in qsort, not in std::sort. The line reads kinda nonsensically to me now that I think of it.

Re:Fastest table sort in the West – Redesigning DuckDB's sort by b9a2cab5 on Friday August 27, 2021 @05:50PM (#28333342)
The way I read it was that with many columns the overhead of the compare function (even if it's inlined) is too high compared to sorting overhead.
Re:Fastest table sort in the West – Redesigning DuckDB's sort by lnkuiper on Friday August 27, 2021 @06:32PM (#28333659)
Exactly. Even when it’s inlined, having a comparator with if/else is much, much slower than a single memcmp