On 2023-10-02 04:33, Bruno Haible wrote:
But your portable code appears to produce fairly decent x86_64 assembly code as well.
Thanks for your fixes. Yes, the goal was portability rather than saving a few instructions. A high-performance implementation of totalorder would need help from the compiler anyway, just as signbit gets help from __builtin_signbit with GCC.
The win for GNU sort, once I get around to fixing totalorder's -lm dependency, is that it can call totalorderl instead of doing what it does now, which is to call sprintf twice and then strcmp.