Live data from Hacker News

The HipHop Virtual Machine

research.facebook.com

21–30 of 31 posts

Re: The HipHop Virtual Machine

#21

I'm migrating to HHVM across my whole stack. Massive performance gains, only issues have been with some plugins that I was able to pretty easily work around. Good stuff! Uncached, HHVM outperforms my cached php-fpm sites.

I've been doing the same and so far have seen big performance gains as well. Using HHVM also has the benefit of being able to "tack on" any Hack code in the future if (for example) you have some important code which could benefit from static typing.

Re: The HipHop Virtual Machine

#22
post #16
post #10

So, a couple of questions: a. Does the HHVM JIT do anything that LuaJIT doesn't? I assume you are familiar with LuaJIT, as it is mentioned in the paper - and from a quick scan, the only two things I didn't recognize from LuaJIT were the refcount optimizations (not required by Lua GC) and guard relaxation. b. Is HHIR tied to Php, or is it usable as a general purpose JIT backend? LuaJIT's IR is, (unfortunately for othe…

It's a shame. As far as I can tell, the only proven multi-language JIT for FOSS platforms is still the JVM? (and Mono maybe?) Despite a lot of that's gone in to Parrot, PyPy, v8, etc, none of these VMs seem to have really taken off beyond the language they were intended for. Somewhat more sad is that pretty much all de-facto default runtimes for popular dynamic languages (except Javascript) are still interpreters...…

What about Guile?

Re: The HipHop Virtual Machine

#23

This is awesome! I am not familiar with how compilers/VMs are generally implemented, but the tracelets and guards idea strikes me as very general - in particular, it looks like this approach could be applied to provide type inference to any dynamically typed language. Has this kind of thing been tried before? In terms of optimization, is it possible to create tracelets that are not continuous regions in code? Roughly…

EDIT: That's what I get for not reading the paper first.

Re: The HipHop Virtual Machine

#24
post #23

This is awesome! I am not familiar with how compilers/VMs are generally implemented, but the tracelets and guards idea strikes me as very general - in particular, it looks like this approach could be applied to provide type inference to any dynamically typed language. Has this kind of thing been tried before? In terms of optimization, is it possible to create tracelets that are not continuous regions in code? Roughly…

EDIT: That's what I get for not reading the paper first.

The tracing JIT was removed from Spidermonkey because it was brittle and didn't perform as well as the traditional JIT compiler(s) (Jaeger..., Ion...) that replaced it.

Re: The HipHop Virtual Machine

#25
post #23

This is awesome! I am not familiar with how compilers/VMs are generally implemented, but the tracelets and guards idea strikes me as very general - in particular, it looks like this approach could be applied to provide type inference to any dynamically typed language. Has this kind of thing been tried before? In terms of optimization, is it possible to create tracelets that are not continuous regions in code? Roughly…

EDIT: That's what I get for not reading the paper first.

note that, confusingly enough, "tracelets" have nothing to do with "tracing JITs".

Re: The HipHop Virtual Machine

#26
post #18
post #16

Earlier quoted context omitted.

It's a shame. As far as I can tell, the only proven multi-language JIT for FOSS platforms is still the JVM? (and Mono maybe?) Despite a lot of that's gone in to Parrot, PyPy, v8, etc, none of these VMs seem to have really taken off beyond the language they were intended for. Somewhat more sad is that pretty much all de-facto default runtimes for popular dynamic languages (except Javascript) are still interpreters...…

I wouldn't say the JVM is a proven multi-language JIT, FOSS or not. It works for multiple languages that go the extra mile - e.g. Jython pays very dearly in performance because of the object model mismatch between Python and Java. And I haven't looked closely recently, but when Clojure first came out, the impedance mismatch between Clojure's persistent data structures and Java's mutable ones also had a ridiculous per…

Scala is pretty widely used. JRuby seems to do quite well as well.

Future times should be interesting as well. I'd be interested to know if the work on value types in the JVM would be useful for Clojure.

Re: The HipHop Virtual Machine

#27
Question to the authors: Any reason why hippyvm is not included for comparison in the paper? It does usually outperform hhvm on those benchmarks (but not on real world use cases which is maybe a good reason to include real world use cases more into such papers).

Re: The HipHop Virtual Machine

#28
post #10

So, a couple of questions: a. Does the HHVM JIT do anything that LuaJIT doesn't? I assume you are familiar with LuaJIT, as it is mentioned in the paper - and from a quick scan, the only two things I didn't recognize from LuaJIT were the refcount optimizations (not required by Lua GC) and guard relaxation. b. Is HHIR tied to Php, or is it usable as a general purpose JIT backend? LuaJIT's IR is, (unfortunately for othe…

As a POC I wrote a rudimentary PHP-to-Lua converter to test this [1] (very limited in features). It performed very well.

1 - https://github.com/cretz/meh

Re: The HipHop Virtual Machine

#29
post #16

Earlier quoted context omitted.

It's a shame. As far as I can tell, the only proven multi-language JIT for FOSS platforms is still the JVM? (and Mono maybe?) Despite a lot of that's gone in to Parrot, PyPy, v8, etc, none of these VMs seem to have really taken off beyond the language they were intended for. Somewhat more sad is that pretty much all de-facto default runtimes for popular dynamic languages (except Javascript) are still interpreters...…

What about Guile?

Does anyone use Guile for anything other than Scheme? I thought all of the other languages were pretty much just half-baked proofs of concept (like Parrot, for that matter).

Re: The HipHop Virtual Machine

#30
post #7

I've been trying this on my few remaining PHP based sites and finding it great. Can we now get the same for Python? ;-)

The same idea has been done for psyco (tracelets there are called basic-block-at-a-time compilation). PyPy uses a tracing JIT instead to achieve better performance in cases where psyco was too hard.
Post reply on HN