Facebook Releases JIT PHP Compiler 244
angry tapir writes, quoting a Techworld article: "In its continuing endeavor to serve its 800 million users as quickly as possible, Facebook is once again revamping the way it handles its PHP-based Web pages. Facebook has posted ... its HipHop Virtual Machine (HHVM), which the company's engineers call a just-in-time PHP compiler. According to Facebook, this PHP execution engine is 60 percent faster than its current PHP interpreter and uses 90 percent less memory."
Facebook has a weblog post with a more technical description.
Re:Mixed feelings (Score:5, Insightful)
That's a step forward for us who rely on crammed share hosting providers, but I strongly believe that PHP has to be phased out in favor of more recent techologies that enforce a clearer (eg DRY, separation of content and logic etc) way of thinking.
Programming languages don't create programming messes. People do.
Is it open sourced? (Score:5, Insightful)
Is FB's JIT PHP open sourced?
Re:Mixed feelings (Score:3, Insightful)
Re:Mixed feelings (Score:5, Insightful)
Re:Mixed feelings (Score:4, Insightful)
And I quote:
Re:Mixed feelings (Score:5, Insightful)
Re:So True. (Score:5, Insightful)
http://en.wikipedia.org/wiki/Ninety-ninety_rule [wikipedia.org]
Re:Mixed feelings (Score:5, Insightful)
Yeah cause PHP is so bad Facebook use it... no programming language is perfect, they all have their quirks. But your comment is baseless, PHP doesn't make bad programmers, it just doesn't break your legs if you are one.
Re:Mixed feelings (Score:5, Insightful)
You are a disgusting filth and I will loath the existence of people who don't use the right tool for the right job for the rest of my life.
You know, people who do fancy stuff with not exactly the right tools were called "hackers".
Re:Mixed feelings (Score:5, Insightful)
Which means it won't be. PHP has taken hold, and good, bad or ugly, we're stuck with it. There's no phasing it in anything like the short or even medium term. LAMP is everywhere, and countless sites are built on it. It's like COBOL, a bad dream that will keep terrifying us even as better languages flicker and die.
dev only (Score:4, Insightful)
Re:Mixed feelings (Score:4, Insightful)
You know, people who do fancy stuff with not exactly the right tools were called "hackers".
Only when it's either hard to do so, or when doing that is some kind of a pun. When the only hallmark of such a work is that the result is a bloated mess...no, hacking doesn't have much to do with it.
Re:Mixed feelings (Score:5, Insightful)
Ya know, about 30 years ago, that statement could have been written thusly:
C programs are per se incompatible with the structured programming model. It's a bad programming practice and if you use it, you are doomed to repeat yourself.
Your statement is pretty much equivalent to "never end a sentence with a preposition".
Structured programming eventually failed to take over the world because it imposed too much artificial, restrictive structure. Back then I remarked that "structured programming" was merely a way to force all programs to fit on a flat two-dimensional surface with no crossing lines. Admittedly, such programs are easier to analyze, but are a tiny, tiny subset of the set of interesting and useful programs. For example, one can look at the entire internet as one rather large, complex, multithreaded program.
MVC is a good model, but it ain't the be-all and end-all. All models are an attempt to impose an rational order on what is essentially a linguistic medium (with a veneer of logic). The languages that survive are those that allow the maximum flexibility, with enough support for the tools of analysis and good practice to allow programmers to succeed. C, for example, continues to succeed because it does not have such artificial constraints, but can be adapted to the constraints that the programmer (and the organization) considers important at the time. As a counterexample, see Pascal, or Algol. And don't forget Gõdel.
So, use MVC and DRY. But one day you will find a situation where they get in the way of the most elegant solution. Or, more likely, they will get in the way of hacking a new feature into some legacy POS in time to meet the deadline that Marketing already promised to the client! :D
Re:Mixed feelings (Score:5, Insightful)
Certain, I'm going to get modded to oblivion for this, but....
Brother I hear your music! PHP is highly underrated! It's a language flexible enough to allow you to just stick a date stamp in the middle of a random webpage, and also write a highly complex, object-oriented application framework with gorgeous abstractions.
Performance is decent, sources are open and don't require compiling, and it's compatible with every webhost and platform out there. It scales well with it's "share nothing" approach, and is one of the most stable software packages I've ever seen. Oh, and the Documentation is excellent.
Sure, it has it's warts: dynamic typing means that in the right contexts, 1==0, and a few others, but these are edge cases in every situation that matters. Most of the problems with OOP in PHP4 have been fixed with the now-almost-universal PHP5.
I can do c, c++, Python, Perl, Javascript, Java, etc. but PHP is my favorite as the Chrysler K-car that doesn't win any looks contests, but always starts and gets you where you want to go, even if only at the legal speed limit.
Re:First PHP post (Score:2, Insightful)
(as you are mod'ed Funny, I'm not entirely sure if your sarcastic or really unknowing)
This is honestly one of the most idiotic and ignorant thing to say about PHP. PHP has it's quirks, and wierdnesses. But it's not any less of a language or platform then anything else.
It did not have any special facilities or out-of-the-box features, prior to 5.3. But it has had FastCGI support for ages. It's honestly the only requirement you really want to scale PHP. You can deploy as many PHP workers as you like. Combined with a shared or replicated webroot and database, you have a really simple and SOLID scale path.
Now when 5.3 is getting more and more deployed we also have PHP-FPM. A dedicated and officially supported process manager to pool and manage php workers. Just like FastCGI, it's architecture is super simple, and a blast to work with. One of the additions is "per pool php.ini", were you run the same instance of the manager but with entirely different PHP environments.
Remember, the PHP philosophy has always been KISS, "Keep It Simple, Stupid". PHP in it self is just the language and runtime. Scaling is deliberately left outside of the core, and developed by people more skilled in that particular area. (Ok ok, its not entierly seperated from the core. PHP-FPM had some minor changes made to the 5.3 codebase to cater for their architecture).
Re:Is it open sourced? (Score:4, Insightful)