Re: opcache.jit directive should be split up
| From: | Ben Ramsey | Date: | Tue, 14 Apr 2020 14:02:55 +0000 |
| Subject: | Re: opcache.jit directive should be split up | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109630@lists.php.net to get a copy of this message | ||
> On Apr 14, 2020, at 08:53, Sebastian Bergmann <sebastian@php.net> wrote:
>
> PHP 8's JIT is currently mainly controlled through the opcache.jit configuration directive
> [1].
>
> The value for opcache.jit is currently a sequence of four digits, "5021" for
> instance. This would activate JIT optimizations based on static type inference and inner procedure
> analyses (Optimization Level), JIT optimization of all functions on load of the respective
> sourcecode file (Trigger), global linear-scan register allocator (Register Allocation), and AVX
> instruction generation (CPU-Specific Optimization Flags).
>
> I think that using a single configuration directive for these four distinct aspects of
> just-in-compilation is a bad idea. Many will, at least at first glance, mistake the value for a
> bitmask.
>
> I think it would be best to split up opcache.jit into five separate configuration directives
> and propose the following names:
>
> * opcache.jit for (de)activating JIT
> * opcache.jit_optimization_level for setting the optimization level
> * opcache.jit_trigger for configuring the JIT trigger
> * opcache.jit_register_allocation for configuring register allocation
> * opcache.jit_cpu_flags for configuring CPU-specific flags
>
> What do you think?
>
> --
> [1] https://wiki.php.net/rfc/jit#phpini_defaults
+1 for improving developer experience. Now’s the time to make this easier for folks to use. If we
wait until after GA, we’ll have to support the harder-to-use sequence of digits for at least the
rest of 8.x.
Cheers,
Ben
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc
Attachment: [application/pgp-signature] Message signed with OpenPGP signature.asc