3 ms·
This isn't an inherit problem with libc, but rather a problem with the libc implementations. IMO libc's should offer an extern inline definition of those funct
by camel-cdr 4y ago
This isn't an inherit problem with libc, but rather a problem with the libc implementations.
IMO libc's should offer an extern inline definition of those functions, so the compilers are able to inline or function specialize them when needed.
- asveikau 4y agoI think that's a good idea. I remember the days when an optimizer didn't really optimize a function pointer call. Now they can probably pull it off if it's the same compilation unit. And if you have link time optimizations, I've seen it do inlines across object files, but obviously that won't work for dynamically linked libc. But a static inline qsort in a libc header is probably a good call.