Rémi Bernon rbernon@codeweavers.com writes:
Signed-off-by: Rémi Bernon rbernon@codeweavers.com
This brings another ~200ms prefix startup time improvement, from ~1.2s to ~1s for "wine cmd /c exit" execution time on average, as well as a ~50ms process startup time improvement, from ~0.25s to ~0.2s execution time when prefix is already started.
The test shows that using wcsicmp is incorrect for face name comparison, or at least that we should not rely on the current locale, and perf also reports a high number of CPU cache miss coming from the locale refcounting, which is the main source of improvement here.
IIUC RtlDowncaseUnicodeChar also does locale dependent case folding, but I'm not sure to see how it's controlled (it's the system default locale that defines the loaded tables right?), and we should probably check if case matching depends on it. If not, is there any canonical normalized unicode case folding that should be used instead?
Unicode case mapping in ntdll is not locale-dependent. You can use CompareStringOrdinal() for that sort of thing.