May 2, 2026
6:46 p.m.
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. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10805#note_138663