May 4, 2026
11:08 a.m.
On Mon May 4 11:08:10 2026 +0000, Alfred Agrell wrote:
If I wanted this function faster, my first idea would be changing _tolower_l (dlls/msvcrt/ctype.h) to ignore locinfo->pctype[c] & _UPPER in the c < 256 path, and always return locinfo->pclmap[c]. One memory access less if it is uppercase, and one branch less for all inputs. Could be combined with your proposed optimization, of course. But I would want numbers on how much impact those optimizations have. We have tests showing that `pctype[c] & _UPPER` check is needed.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10805#note_138722