
Facebook speeds up PHP - mcxx
http://www.readwriteweb.com/archives/facebook_gets_faster_debuts_homegrown_php_compiler.php?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+readwriteweb+%28ReadWriteWeb%29&utm_content=Twitter
======
pmjordan
"We wish Facebook had made this project open, as we're sure many PHP
developers would concur that the efforts _would have been much swifter_ and
more beneficial to the public had more folks and a larger team been involved
from the outset."

Considering the uproar generated by introducing something like namespaces into
PHP, I strongly suspect the opposite of the bit in italics to be true. In
fact, that's possibly why they did it this way.

~~~
pbiggar
This is pure crap. phc (<http://www.phpcompiler.org>) has been open source for
4 years and actively soliciting help for 2 years. Did anyone in the PHP
community step up to help? Not one.

(I mean the quote is pure crap, not your comment).

~~~
joshfinnie
Though you never know what effect having Facebook's name attached to the
program would have done for its acceptance into the ranks of PHP programmers.
Would you rather help Facebook do something or phpcompiler.org do something...

------
pvg
It might make more sense to wait the supposed few hours and see what Facebook
actually releases. Especially if one is going to berate them for not releasing
(as open-source) something before they've released anything.

------
pbiggar
They are wrong to say that Unladen Swallow gets a 5x speedup. That was their
initial plan, but they claim now they were naive. Their speedup in less than
2x.

I think this reporting is a little haphazard.

~~~
scythe
unladen-swallow does not get a 5x speedup, but pypy gets pretty close.

[http://morepypy.blogspot.com/search?updated-
min=2010-01-01T0...](http://morepypy.blogspot.com/search?updated-
min=2010-01-01T00%3A00%3A00%2B01%3A00&updated-
max=2011-01-01T00%3A00%3A00%2B01%3A00&max-results=1)

<http://article.gmane.org/gmane.comp.lang.lua.general/42210> is tangentially
related.

~~~
pvg
Being slower on a third out of 15 benchmarks is not actually 'pretty close'.
Pypy results are impressive given the task at hand and approach taken. But
it's not anything like 5 times faster or close, by any measure.

------
oscardelben
There's so much disinformation in those comments. One person is happy that
they are moving to php (what?), another person now has a good reason to say
that php is faster than other languages. That's hilarious

~~~
Lancer383
Just came here to say the same thing. Also loved many saying that Facebook
hasn't open sourced anything (and even in the ones that do realize that
they've open sourced code, no one mentions Tornado).

------
daremon
"...that will increase speed by around 80%..."

I guess this is compared to plain PHP not to accelerators? And what exactly is
the difference from a PHP accelerator?

~~~
pvg
The typical PHP accelerators cache bytecode rather than native code.

~~~
FooBarWidget
Yes but I wonder how much it will really help. Is the bottleneck for Facebook-
like sites really in the bytecode dispatching as opposed to e.g. string/regexp
operations or database calls?

~~~
pvg
It seems sensible to assume it helps them for something otherwise why bother
developing and releasing it? I also don't think it's a matter of bottleneck -
if you make the front-end php run faster you need fewer servers, fewer
servers/user, more money. This has come up in discussions about google as well
- there are some scales at which even comparatively modest improvements in
efficiency count. It probably won't make a world of difference to My Cousin's
Personal Basement URL Shortener.

~~~
pbhjpbhj
> _It seems sensible to assume it helps them for something otherwise why
> bother developing and releasing it?_

Well surely the proof is in the eating - that is, if they've implemented it
then it clearly works, they wouldn't be stupid enough to implement it if it's
going to cost them money.

To answer your [rhetorical] question: The cost for this has been one developer
for a year. That's not much for a speculative shot at increased server
efficiencies that could save them big money in the server farm. Once they've
developed it, even if it didn't produce the gains they needed then releasing
it is sensible as it gains them some PR amongst the OS community and may get
more fixes from that same community improving the result (lower costs) for FB.

~~~
pvg
We don't really know anything about it. One developer, five developers, 10,
20, 9923123% better. Let's just see what they release, if anything.

~~~
pbhjpbhj
Sorry I read somewhere else that it was a single dev and that the gains were
expected to be 5x improvement in speed for the same processing power. Can't
recall where.

------
danskil
Did they release any kind of benchmarks? I'm curious how this stacks up to
passenger and Ruby enterprise edition (faster i'm sure), but would be
interesting to see a side by side comparison.

