|
From: | Paul Eggert |
Subject: | Re: From wchar_t to char32_t |
Date: | Tue, 11 Jul 2023 01:01:14 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 2023-07-10 07:58, Bruno Haible wrote:
- The rationale for defining and initializing the mbstate_t at the function scope was that on BSD and macOS systems, an mbstate_t is 128 bytes large,
We can improve on that. I installed the attached two performance tweaks; the second tweak cuts that initialization from 128 down to at most 12 bytes on those platforms. On x86-64 GNU/Linux these patches barely make a difference (one insn smaller). On the BSDs the patch is a bigger deal.
Even on the rare untweaked platform I expect (though I haven't measured) that mbcel's speed is competitive.
0001-diff-add-mbcel-checks-compiler-advice.patch
Description: Text Data
0002-diff-tweak-mbstate_t-performance.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |