Re: Make strtolower/strtoupper just do ASCII
| From: | Tim Starling | Date: | Thu, 23 Sep 2021 05:40:22 +0000 |
| Subject: | Re: Make strtolower/strtoupper just do ASCII | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-116140@lists.php.net to get a copy of this message | ||
On 19/9/21 12:33 am, tyson andre wrote:
> When implementing this, Zend/Optimizer/sccp.c has optimizations for functions such as
> str_contains, etc to optimize.
> After removing locale dependence, those optimizations could be safely added for functions that
> would be locale independent as a result of your change.
> - This would allow eliminating more dead code, and make code calling those functions (on
> constant arguments) faster by caching the resulting strings in opcache.
I couldn't make this work. Even after setting
opcache.optimization_level to 0x7FFFFFBF (pass 6 will not run unless
pass 7 is disabled), zend_dfa_optimize_op_array() is called with
call_map=NULL, so ct_eval_func_call() is never entered. I'll leave
this change for someone who is able to test it (or for someone braver
than me).
-- Tim Starling