HHVM's Profile-Guided Region JIT
hhvm.com
hhvm.com
On the other hand the HHVM team had to reimplement a lot more code that php 7 had ready from 5.6.
The memory reductions when dealing with large arrays (pretty much the only datatype in PHP...) are colossal.
linked-hash-map-arrays, they are :)
php7 reduced all its data structures significantly. nowadays slimmer data structures are much more important than cpu.
It might not be as fast as a dedicated JIT with a big team behind it, but it seems Facebook's HHVM effort is relatively small as these things go.
Is there anything about PHP that would make Truffle a bad fit? I ask this as someone who knows next to nothing about either PHP or Truffle!
Interesting project. Maintained by Oracle, though.
Perhaps one barrier would be the insane number of built-in functions. There's 1000+[1]. And, as far as I can tell, most of them tied to underlying C code versus being written in PHP themselves.
The other might be that because of the built-in templating thing, you would have to parse html as well, to find the embedded PHP. I'm not sure how well that aligns with Truffle's approach. Things like this:
<ul>
<?php foreach ($foolist as $foo) { ?>
<li><?php echo $foo;?></li>
<?php } ?>
</ul>
[1] Try: php -r 'var_dump(get_defined_functions());' | less