[libcxx-commits] [libcxx] [libc++] Optimize `text_encoding::environment_is()` for UTF-8, ASCII, Windows1252 and ISOLatin1 (PR #225136)

Corentin Jabot via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 22 01:56:44 PDT 2026


cor3ntin wrote:

I think WG21 was concerned about the footprint of these tables, however because libc++ load them from a source files,
it's probably less of a concern.

I do think doing it for UTF-8 might make sense.
On windows, i think you could call GetACP and avoid string comparisons entirely. 

How far we want to go and whether we want to do that now is a call for libc++ folks.
It might be better to let optimizations be driven by users demand rather than concerns brought up by WG21 during the review of the paper

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


More information about the libcxx-commits mailing list