[libcxx-commits] [libcxx] [libc++] Optimize lexicographical_compare (PR #65279)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 5 16:21:11 PDT 2023


EricWF wrote:

Please take a look at this godbolt.

It looks like under optimized builds, apart from for `unsigned char`, there is literally no difference in generated assembly.
However, for non-optimized builds, the new implementation is like 3x the size of the old one.

I don't think that cost/benefit trade off has the correct balance. 

Convince me otherwise?

https://github.com/llvm/llvm-project/pull/65279


More information about the libcxx-commits mailing list