On 02/22/2015 11:06 AM, Joe Watkins wrote:

This is an inescapable difference, of the the kind that definitely does
have a negative impact on implementation complexity, runtime, and
maintainability.

To me, it only makes sense to compile strict code AOT or JIT; If you want
dynamic behaviour, we have an extremely mature platform for that.

So basically weak mode coupled with a JIT will be almost the same thing we have today, the only difference is the opcache would be replaced with machine code (for a bit more of performance), but the same logic and code used on the zend engine will also be used on the generated code of the JIT (more bloat).

On the other hand a strict type mode would allow the generation of machine code that is much cleaner and similar in respect of C to machine code translation, meaning it would be more efficient and less resource hungry to the point that functions code generated by the AOT or JIT would be more efficient than those functions provided by the zend engine, which does lots of type checking/parsing (less bloat).


There should hopefully be no need to complicate the core with the
implementation, the number of people that are capable of maintaining Zend
is low enough already, the number of people able to maintain something as
new (for us) and complex as a JIT/AOT engine is even less, I fear.

And thats why I asked about the commercial stuff, because, like things are looking, from a technical perspective the strict mode opens the doors for an easier implementation of AOT or JIT while a weak mode would only make it harder for others in the community to work in such things, which again rises the question, does this whole idea of favoring a weak model by the minority serve as an impediment/complication for others so they (those who favor weak) can force a commercial solution?

I think it's likely that Anthony and I, and Dmitry want different things
for a JIT/AOT engine. I think Anthony and I are preferring an engine that
requires minimal inference because type information is present (or
implicit), while Dmitry probably favours the kind that can infer at
runtime, the dynamic kind, like Zend is today. They are a world apart, I
think, I'll be happy to be proven wrong about that.

I like to think that even if Dmitry wrote it all by himself, it would be
opensource from the start, in fact I don't think that will happen. I'm
hoping we'll all work on the same solution together.

And it would be ideal to have the most capable people to develop this solution to work in a single team from a community point of view. IMHO a dual weak/strict mode is the best way of getting people to work together in a way that benefits the community. Otherwise, a single handed man working on a solution can serve as a justification to commercialize something that is being currently offered by others (HHVM).


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

Reply via email to