On Fri, Feb 27, 2015 at 9:55 PM, Anthony Ferrara <ircmax...@gmail.com> wrote:
> Zeev, > > >> Right now it compiles script (php file) at once. > >> So yes, our JIT uses some kind of AOT approach, but completely > >> transparently for the rest of PHP. > > > > Just to slightly further clarify - we don't compile the whole codebase at > > once, but we keep the existing semantics that every file is independent, > may > > change independently of other files, and include() may end up load one > file > > in one flow and another one in another flow. There's isn't any > cross-file > > optimization. > > > >> We also tried few different approaches to collect formation about hot > >> functions and generate code only for them. > >> Unfortunately, this didn't change the picture. > > > > (again, the picture being no performance gains in common Web apps). > > Well, I just want to make one clarification here to your point: > there's no performance gains to this AOT approach for common web apps. > > It's not really fair to judge a true JIT implementation based on this > because it lacks crucial runtime information that a real JIT compiler > would have (such as input types, values, etc). So it would be left > generating generic native code instead of specific code. I just want > to point out that the results here aren't really applicable to a JIT > approach. And that should be made clear when discussing it. > Nobody talk about JIT in general, only about this PoC. And yes, some other approaches may provide better gain. At least I think so. However, we may just guess, until implement them. > That's not to say there's anything wrong with this approach, nor that > there isn't a ton we can learn from it. I think it's a fantastic > research effort and plan on digging through it myself. Thank you for > open sourcing it. > Thanks for good words :) This work may be adopted for some specific cases. 25-30 times speedup on Mandelbrot allows usage for numeric calculation instead of C. https://gist.github.com/dstogov/12323ad13d3240aee8f1 anyone may repeat the language battle :) Thanks. Dmitry. > > Anthony >