[libc-commits] [libc] [libc][wctype] Add gen script for conversion functions (PR #198645)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Mon Jun 29 05:29:36 PDT 2026


kaladron wrote:

I'm sorry about the delay in getting to this - my worklist script had a bug.

The first thing that jumps out at me is that it's hard to tell what's happening and what I'm reviewing for.  A commit message like the following would really help:

[libc][wctype] Use perfect hash for case conversions (#198645)

Updated wctype generation scripts to produce PerfectHashMap headers instead of raw array data.

* Integrated cppyy to execute C++ perfect hash generation during the build process.
* Split tables into 16-bit and 32-bit segments to optimize for different WINT_MAX sizes.

But even this is missing the why - is it more performant?  What's the memory tradeoff?  Is that the right tradeoff for all environments, etc?  Without this, coming into this review cold makes it difficult to know whether it's right or not.

Please let me know if that doesn't make sense!  I'm happy to give more details. =)


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


More information about the libc-commits mailing list