Speeding up PHP with the HipHop VM
11–20 of 122 posts
Re: Speeding up PHP with the HipHop VM
#12Things make sense now. I remember a while back Facebook invested in an experiment with PHP on PyPy. They didn't pursue it, even though it produced impressive results. It seems their own in-house JIT has better performance?
PyPy is taking a radically different approach from what HHVM is doing (and really from what almost all other dynamic language systems are doing), and it's a fascinating system. Part of what's exciting about it is that it seems like it should be applicable to other languages with less effort than most other JITs, and we wanted to understand its potential for a language like PHP. We asked Maciej Fijalkowski (hi, Maciej, if you're reading!) to help us do a research prototype to see what the first few roadblocks would look like, and Maciej did a great job. Just because we didn't scrap our current project and shift all our resources to PyPy should not be seen as a negative reflection on PyPy at all.
Re: Speeding up PHP with the HipHop VM
#13Will FB ever invest and move off PHP? Hiring talent at FB has to be getting harder and PHP probably isn't helping.
The PHP development environment at Facebook is unlike that found at any other company I'm aware of, and common PHP pitfalls and legacy code are actively "linted" out of the system (as an automated part of the code review process). It still wouldn't be my choice of language to use outside of Facebook, but I have no issue working on the PHP code base here (although I rarely venture into it).
Over time, much logic and processing has been offloaded to backend services, with PHP increasingly playing a (largely parallelised) dispatch, post-process, and render role. That will likely continue.
With all that said, it is questionable whether it would be an investment to move off of it - which language/environment would you think a good target would be, and why?
Re: Speeding up PHP with the HipHop VM
#14Re: Speeding up PHP with the HipHop VM
#15What version of PHP does HPHP match? 5.3 or 5.4? I ask because I've become very accustomed the short array syntax ([1,2,3]) and other goodies in 5.4.
Edit: notably not short array syntax, at least yet.
Re: Speeding up PHP with the HipHop VM
#16Will FB ever invest and move off PHP? Hiring talent at FB has to be getting harder and PHP probably isn't helping.
Re: Speeding up PHP with the HipHop VM
#17Out of curiosity if there's anyone involved in Facebook on HipHop, has there ever been a discussion about just shifting from PHP to a more performant language, or is a case of still reaping the benefits of PHP in terms of dropping a developer in and not worrying about skill sets?
Re: Speeding up PHP with the HipHop VM
#18Will FB ever invest and move off PHP? Hiring talent at FB has to be getting harder and PHP probably isn't helping.
I think you underestimate the number of PHP developers out there. There aren't many on Hacker News because we're all too cool for that stuff, but in the developer world in general there are a ton.
I'd imagine people signing up to work at FB do so despite the fact they use PHP, not because of it.
Re: Speeding up PHP with the HipHop VM
#19Why is the blog on facebook?
Re: Speeding up PHP with the HipHop VM
#20Amazed at all the 'engineer X policy or feature request slackers'. Can't say I'm the biggest fan of Facebook as a service but what their engineers are doing in terms of pushing the state of the art is fantastic. Out of curiosity if there's anyone involved in Facebook on HipHop, has there ever been a discussion about just shifting from PHP to a more performant language, or is a case of still reaping the benefits of PH…
We already shift lots of things out of PHP into more performant (c++, java, etc) languages when we are building services and/or extensions and/or other computationally intensive things.
But I think more to your point (and if not, let me indulge in the strawman), since this comes up frequently on reddit/hn: php is not somehow -uniquely- broken. While PHP might be uniquely broken as a language (ha ha), it's not -uniquely- broken as a platform/runtime. Everything you think is performant is broken at a large enough scale. Put another way, it's not just about the switching costs of rewriting in some other language. If we could magically snap our fingers and convert the entire codebase from php to some other language, that's just the beginning of understanding, tweaking, and occasionally rebuilding everything about the runtime/libraries/etc to make it work.
At the end of the day the language itself is given way too much attention in discussions like this.