News for hackers. Stuff that matters.
Re:Fast character case conversion (or how to compress sparse... by edflsafoiewq on Wednesday October 13, 2021 @03:03PM (#28856033)
quickjs has pretty cool case conversion too. It special cases ASCII, then does the rest with a binary search through some kinda run-length encoded table. There's more code but the table itself is only about 2K for both case directions.

https://github.com/bellard/quickjs/blob/b5e62895c619d4ffc75c...

Re:Fast character case conversion (or how to compress sparse... by lifthrasiir on Wednesday October 13, 2021 @07:04PM (#28858654)
The ASCII special case is especially important when you apply casing operations to a run of code points, where you can leverage SIMD or any bitwise trickery to convert a block of ASCII characters and fall back to a slow iteration otherwise.