Re: [PHP-DEV] Re: @@Jit Attribute Considerations
On 06.08.2020 08:50, Dmitry Stogov wrote: > My solution: > > - remove doc-comment trigger. It doesn't make sense. > - add @@Jit("off") only. Later we may extend this. There are pros and cons to the "Jit" attribute name, please consider @@JitOff (and @@JitOn). Also make sure to define what happens if you use the attribute on a function as well as class or e.g. class constant. In other words, when it's not applicable will it be ignored or throw a warning/error? -- Aleksander Machniak Kolab Groupware Developer[https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] PGP: 19359DC1 # Blog: https://kolabian.wordpress.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php
Re: [PHP-DEV] Re: @@Jit Attribute Considerations
My solution: - remove doc-comment trigger. It doesn't make sense. - add @@Jit("off") only. Later we may extend this. On Tue, Aug 4, 2020 at 11:11 AM Benjamin Eberlei wrote: > On Mon, Aug 3, 2020 at 7:44 PM Benjamin Eberlei > wrote: > > > Hi, > > > > I am going to pick up a discussion from > > https://github.com/php/php-src/pull/5915 about the @@Jit attribute. > > > > Nikita mentioned he is still not 100% clear what the usecase is for @@Jit > > attribute and asked to discuss here. > > > > The reason is that the default tracing JIT is clever to decide itself > when > > to JIT or not, better not interfere with that. In case you run the > tracing > > JIT, only @@Jit("off") has an effect the others @@Jit("tracing") and > > @@Jit("function") get ignored. > > > > Only the trigger mode 4 (attributes) is actually using @@Jit("tracing") > > and "function". This trigger mode feels like micro-management for > > developers and since it has virtually no spotlight in discussions and > blog > > posts about the JIT at the moment, we don't know if it brings benefits. > > > > Maybe for now it would be better to remove docblock / attribute support > > for the JIT, and take a new attempt at it in 8.1? That prevents us from > > rolling something we regret having to maintain later. > > > > I updated the PR https://github.com/php/php-src/pull/5915 with the > following things: > > - Removed attribute trigger mode for now. > - Removed obsolete doc comment trigger mode > - Add @@Jit("off") to disable JIT for an op_array or script > > Open questions: > - Are we ok with removing @Jit("on"), @@Jit("tracing") and > @@Jit("function") for now to thoroughly discuss best approach for 8.1? > - Rename @@Jit to something more specific like @@JitOptions or @@JitHint? > - Remove the attribute trigger constant 4, and move tracing JIT to use 4 > instead of 5? > > Outlook: > > We need to think about what the @@Jit attribute should actually mean in > context of the function or tracing JIT. Personally it probably means > "Always Jit this function regardless of hot counter or tracing results". > I believe we don't need the attributes trigger mode, as everything happens > either in context of function or tracing JIT. > > > > greetings > > Benjamin > > >
[PHP-DEV] Re: @@Jit Attribute Considerations
On Mon, Aug 3, 2020 at 7:44 PM Benjamin Eberlei wrote: > Hi, > > I am going to pick up a discussion from > https://github.com/php/php-src/pull/5915 about the @@Jit attribute. > > Nikita mentioned he is still not 100% clear what the usecase is for @@Jit > attribute and asked to discuss here. > > The reason is that the default tracing JIT is clever to decide itself when > to JIT or not, better not interfere with that. In case you run the tracing > JIT, only @@Jit("off") has an effect the others @@Jit("tracing") and > @@Jit("function") get ignored. > > Only the trigger mode 4 (attributes) is actually using @@Jit("tracing") > and "function". This trigger mode feels like micro-management for > developers and since it has virtually no spotlight in discussions and blog > posts about the JIT at the moment, we don't know if it brings benefits. > > Maybe for now it would be better to remove docblock / attribute support > for the JIT, and take a new attempt at it in 8.1? That prevents us from > rolling something we regret having to maintain later. > I updated the PR https://github.com/php/php-src/pull/5915 with the following things: - Removed attribute trigger mode for now. - Removed obsolete doc comment trigger mode - Add @@Jit("off") to disable JIT for an op_array or script Open questions: - Are we ok with removing @Jit("on"), @@Jit("tracing") and @@Jit("function") for now to thoroughly discuss best approach for 8.1? - Rename @@Jit to something more specific like @@JitOptions or @@JitHint? - Remove the attribute trigger constant 4, and move tracing JIT to use 4 instead of 5? Outlook: We need to think about what the @@Jit attribute should actually mean in context of the function or tracing JIT. Personally it probably means "Always Jit this function regardless of hot counter or tracing results". I believe we don't need the attributes trigger mode, as everything happens either in context of function or tracing JIT. > greetings > Benjamin >