From: Alexandre Julliard Subject: Re: [PATCH 1/2] gdi32/tests: Add locale-dependent face matching test. Message-Id: <87zh381ad3.fsf@wine> Date: Mon, 23 Nov 2020 14:16:56 +0100 In-Reply-To: <20201123122050.490616-1-rbernon@codeweavers.com> (=?utf-8?Q?=22R=C3=A9mi?= Bernon"'s message of "Mon, 23 Nov 2020 13:20:49 +0100") References: <20201123122050.490616-1-rbernon@codeweavers.com> Rémi Bernon writes: > Signed-off-by: Rémi Bernon > --- > > 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. -- Alexandre Julliard julliard@winehq.org