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

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 5 18:14:20 PDT 2023


philnik777 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?

Could you share the link you were looking at?


> @philnik777 Also, please include descriptions. IT took me an hour to realize this change only affects `unsigned char`.

This is only a draft, so I didn't bother writing a comment. This patch isn't ready for review yet.

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


More information about the libcxx-commits mailing list