Re: [RFC] Locale-independent case conversion
| From: | Tim Starling | Date: | Thu, 23 Sep 2021 07:13:45 +0000 |
| Subject: | Re: [RFC] Locale-independent case conversion | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116143@lists.php.net to get a copy of this message | ||
On 23/9/21 4:53 pm, Pierre Joye wrote:
> I wonder if either JIT could be used for the intrinsics support,
> adding neon, sse[2-4.2] or avc256/512 (the latter would basically
> allow most common strings to be converted in one go.
>
> If not, maybe split implementation however runtime cpu support would
> be better. Many distributions built with SSE2 flags but are actually
> ran on much recent CPUs, same for ARM (ie. graviton/neon f.e.).
> Thoughts?
SSE2 is already scary-fast. I benchmarked the SSE2 tolower code on my
laptop: it was chewing through strings at 18 GiB/s, i.e. 50ps per
byte. This was a benchmark written in C -- you would have a lot of
trouble making a PHP tight loop in which SSE2 case conversion is the
slow part.
-- Tim Starling