ldionne wrote: This is clever: that way we know it's a pure optimization to call spaceship instead of less-than twice. IIUC you'd plan to use this from libc++ to optimize eg __find_equal even on user-defined types? https://github.com/llvm/llvm-project/pull/155612