That goes exactly opposite of this optimization, and is just entirely orthogonal.
> It's also super disappointing that in 2022 we're still manually marking 10- line functions used in one place and called from one site as inline.
You misunderstand the change.
In a nutshell the prior version was a polymorphic function pointer that varied by the sort type.
(*sort_ptr)(data);
No compiler can inline this, no matter how aggressively you turn up the optimizations.Their change adds specialized cases.
if (dataType == PG_INT32) {
sort_int32(data);
} else if (dataType == PG_INT64) {
sort_int64(data);
} ... {
} else {
(*sort_ptr)(data);
}
This enabled the inlining, and while it's no harm to add the inline specifier if you want to be very overt in your intentions, most compilers would inline it regardless in most scenarios.