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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to