TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Speeding up PHP with the HipHop VM

203 pointsby kmavmover 12 years ago

13 comments

mcmireover 12 years ago
Does anyone else think this is a tremendous waste of time for Facebook? I mean, obviously PHP powers a lot of stuff at Facebook, I'm sure there are zillions of lines of code they can't just replace today, and now they're forced to make it scale. I don't mean to be negative -- building faster, better systems is inspiring, and the stuff they are doing with PHP is pretty neat, and there are really smart people trying to figure this stuff out. But, you have to ask, why are they still using PHP?? Why not use some of the new stuff that's out there now or heck, why not go with the JVM instead of reinventing the wheel here?<p>No I'm genuinely asking. Isn't some of the stuff here already being done by other languages, or is Facebook really breaking new ground here? (yes lbrandy I saw your earlier comment)
评论 #4851852 未加载
评论 #4851898 未加载
评论 #4852568 未加载
ck2over 12 years ago
By the way, there is an alternative to HipHop that is actually easier to implement because it makes php extensions.<p>It's called PHC <a href="http://phpcompiler.org" rel="nofollow">http://phpcompiler.org</a> and it's open source.<p>It was Paul Biggar's PhD thesis <a href="http://blog.paulbiggar.com/archive/a-rant-about-php-compilers-in-general-and-hiphop-in-particular/" rel="nofollow">http://blog.paulbiggar.com/archive/a-rant-about-php-compiler...</a><p>It just needs some community contributions to catch up.
评论 #4851548 未加载
pbiggarover 12 years ago
This is curious. Their trace-based approach looks like Mozilla's Tracemonkey - even using the same terminology like side-exits. Mozilla discontinued Tracemonkey because it was really good for deep loops and not much else. They moved to JaegerMonkey, which is a method-compiled VM like v8 (at the time), and are now moving to IonMonkey, which is a best-of-all-worlds version.<p>So I'd love to hear why using a circa-2009 technology was the right one? Is PHP sufficiently different from Javascript for this to make sense (as someone who has worked on VMs for both, I think there's a good chance of that)? Why not use a method-compiler instead? Very interested in the answers and comparison to other JITs out there, if any HHVM people are here.
评论 #4851645 未加载
评论 #4851602 未加载
评论 #4852114 未加载
nicholassmithover 12 years ago
Amazed 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.<p>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 PHP in terms of dropping a developer in and not worrying about skill sets?
评论 #4851159 未加载
评论 #4852154 未加载
评论 #4853255 未加载
fomojolaover 12 years ago
I'm curious if they were still evolving HPHPc at the same time as they were evolving HHVM: the chart shows HPHPc as having flat performance over time, while HHVM was getting better over a 7-month period. Could HPHPc have achieved the same performance gains if the same effort was expended?
评论 #4850674 未加载
评论 #4850695 未加载
maratdover 12 years ago
Things 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?
评论 #4850803 未加载
maratdover 12 years ago
For those who want to get their hands dirty:<p>CentOS 6.3 x64: <a href="https://github.com/facebook/hiphop-php/wiki/Building-and-installing-HHVM-on-CentOS-6.3" rel="nofollow">https://github.com/facebook/hiphop-php/wiki/Building-and-ins...</a><p>Ubuntu 12.04 x64: <a href="https://github.com/facebook/hiphop-php/wiki/Building-and-installing-HHVM-on-Ubuntu-12.04" rel="nofollow">https://github.com/facebook/hiphop-php/wiki/Building-and-ins...</a>
评论 #4852017 未加载
rynopover 12 years ago
First off thanks for all the hard work. Do you have a list of the php extensions you support? I’m wondering if things like cURL, memcache, pdo MySQL etc are supported. I found <a href="https://github.com/facebook/hiphop-php/wiki/Extensions-and-modules-roadmap" rel="nofollow">https://github.com/facebook/hiphop-php/wiki/Extensions-and-m...</a> but its a bit outdated (last mod 2yrs ago).<p>Also wondering what APC methods you support.
评论 #4855646 未加载
timdorrover 12 years ago
What 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.
评论 #4850878 未加载
olafover 12 years ago
"So, when you combine XHP with HipHop PHP you can start to imagine that the performance penalty would be a lot less than 75% and it becomes a viable approach." <a href="http://toys.lerdorf.com/archives/54-A-quick-look-at-XHP.html" rel="nofollow">http://toys.lerdorf.com/archives/54-A-quick-look-at-XHP.html</a>
评论 #4853269 未加载
bretthellmanover 12 years ago
Will FB ever invest and move off PHP? Hiring talent at FB has to be getting harder and PHP probably isn't helping.
评论 #4850825 未加载
评论 #4851337 未加载
评论 #4851488 未加载
评论 #4850986 未加载
lectrickover 12 years ago
Like putting a rocket on a turd.
3825over 12 years ago
Why is the blog on facebook?
评论 #4851145 未加载
评论 #4850629 未加载
评论 #4850640 未加载