Live data from Hacker News

Refactored PHP engine makes Wordpress 20% faster

news.php.net

101–110 of 147 posts

Re: Refactored PHP engine makes Wordpress 20% faster

#101

Earlier quoted context omitted.

Dmitry is the man who originally wrote eaccelerator, Zend caught wind of him and hired him! Then he worked on opcache and has done some amazing things in getting the Zend Engine and PHP itself flying. He's a very smart cookie.

His good sense is obvious by the way he stopped going down the JIT route and zeroed in on the bigger performance drain, memory allocation, instead. The smart programmer knows how to write a JIT; the wise programmer knows how to not write a JIT.

JIT is probably coming too, just with current way the engine built it turns out it is very hard to do JIT that makes any real-life impact. One can get magnificent benchmarks, but once you hit real-life apps, you get very low improvement. Thus a more attainable goal was chosen, but JIT may come back yet.

Re: Refactored PHP engine makes Wordpress 20% faster

#102
post #61
post #15

Earlier quoted context omitted.

Just try to imagine HHVM in year or two. Zend PHP will be irrelevant by then.

I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. I'm considering it for all my PHP projects already - it's easy to install and most PHP frameworks are well-supported already ( http://hhvm.com/frameworks/ ). I can imagine HHVM having integration within Nginx a la HttpLuaModule, which uses LuaJIT and would eliminate going the FastCGI route.

While technically your statement is true - HHVM had zero ground some time ago and standard PHP had 100% ground, and now HHVM has some ground (which is witnessed by your use of it) so PHP has less than 100% - the substance of it - implying that HHVM is somehow fast on its way to replace PHP - does not match observed reality. Extraordinary claims require extraordinary proof, and so far none was provided. It is great to see this project gaining acceptance, but let's not get ahead of the facts and claim something that does not exist yet.

Re: Refactored PHP engine makes Wordpress 20% faster

#103
post #77
post #71

Earlier quoted context omitted.

> I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. Perhaps because some on HN are computer scientists, so to convince them it takes actual numbers and not some anecdotal evidence of what you personally use. Judging from all available data sources, you are an outlier. HHVM doesn't have that large a community (mostly FB people), is not installed in the overw…

I have nearly 30 years of professional experience and my intuition is pretty reliable. If HHVM wasn't what runs the largest PHP app in the world, things would have been much different. Hack brings many language people that Zend for one reason or another didn't not deliver all these years.

Blue whale is the largest mammal on the planet, but that doesn't mean eating nothing but krill is a good idea for every mammal. Everybody has different needs and different capabilities, so "Facebook does it" and "everybody does it" are quite different.

Re: Refactored PHP engine makes Wordpress 20% faster

#104
post #103
post #77

Earlier quoted context omitted.

I have nearly 30 years of professional experience and my intuition is pretty reliable. If HHVM wasn't what runs the largest PHP app in the world, things would have been much different. Hack brings many language people that Zend for one reason or another didn't not deliver all these years.

Blue whale is the largest mammal on the planet, but that doesn't mean eating nothing but krill is a good idea for every mammal. Everybody has different needs and different capabilities, so "Facebook does it" and "everybody does it" are quite different.

As a side note, krill is pretty nutritious - just not widely available to all mammals.

Re: Refactored PHP engine makes Wordpress 20% faster

#105
post #63
post #51

Earlier quoted context omitted.

What's so good about Symfony compared to other PHP frameworks?

It's a mature, well designed and cleanly written piece of software that is very modular. It also has a great documentation and knowledgeable community around it. Other PHP frameworks lack some or most of these features: some are either very opinionated and rigid (Yii, Cake) huge and sparsely documented (Zend 2) or just old and approaching abandonment (Codeigniter, Kohana).

I really like Yii. In my opinion it is exceptionally well designed and offers so much functionality.

The Yii programmers designed it with performance in mind. I can understand that you find it opinionated, but in my opinions the pros outweigh the cons.

Re: Refactored PHP engine makes Wordpress 20% faster

#106
post #102
post #61

Earlier quoted context omitted.

I'm not sure why you guys ganged up to downvote on something obvious - PHP is loosing grounds to HHVM already. I'm considering it for all my PHP projects already - it's easy to install and most PHP frameworks are well-supported already ( http://hhvm.com/frameworks/ ). I can imagine HHVM having integration within Nginx a la HttpLuaModule, which uses LuaJIT and would eliminate going the FastCGI route.

While technically your statement is true - HHVM had zero ground some time ago and standard PHP had 100% ground, and now HHVM has some ground (which is witnessed by your use of it) so PHP has less than 100% - the substance of it - implying that HHVM is somehow fast on its way to replace PHP - does not match observed reality. Extraordinary claims require extraordinary proof, and so far none was provided. It is great to…

Nobody cares about today; everybody cares about tomorrow. If you've closely monitored the developments around HHVM and applied knowledge from past experience with successfully managed projects, you'd have zero doubt that HHVM has all components of being widely successful. It will never reach 100%, but for larger projects, it will be preferred just like many go thru the trouble of implementing Nginx + PHP-FPM vs stock Apache + mod_php.

Re: Refactored PHP engine makes Wordpress 20% faster

#107
post #106
post #102

Earlier quoted context omitted.

While technically your statement is true - HHVM had zero ground some time ago and standard PHP had 100% ground, and now HHVM has some ground (which is witnessed by your use of it) so PHP has less than 100% - the substance of it - implying that HHVM is somehow fast on its way to replace PHP - does not match observed reality. Extraordinary claims require extraordinary proof, and so far none was provided. It is great to…

Nobody cares about today; everybody cares about tomorrow. If you've closely monitored the developments around HHVM and applied knowledge from past experience with successfully managed projects, you'd have zero doubt that HHVM has all components of being widely successful. It will never reach 100%, but for larger projects, it will be preferred just like many go thru the trouble of implementing Nginx + PHP-FPM vs stock…

Just like the original HipHop C++ compiler I guess?

Re: Refactored PHP engine makes Wordpress 20% faster

#108

Earlier quoted context omitted.

> No, but I can name a lot of things that are way easier and cleaner to do in Python than in PHP. Please do.

I can name two. First, list comprehensions. In PHP, what you might write as this: $image_urls = []; foreach ($images as $image) { $image_urls[] = 'illos/' . $image['url']; } can just be this in Python: image_urls = ['illos/' + x['url'] for x in images] And, closures in Python -- and to be fair, just about any language that isn't PHP -- close over variables in the scope they're defined automatically, without having to…

> can just be this in Python:

In PHP 5.3+ you can write:

    $image_urls = array_map(function($image) {return 'illos/'. $image['url'];}, $images);
Not as concise, but I'd postulate easier to read for people not familiar with list comprehensions.

In PHP 5.5+ there may be another way, but we're stuck with 5.3 in production for most clients, so I'm not up to speed.

> And, closures in Python -- and to be fair, just about any language that isn't PHP -- close over variables in the scope they're defined automatically, without having to use PHP's strange "use ($a, $b, $c)" construct.

Mmm, the debate of explicit or implicit scope? Explicit at least gets round those strange errors (hello Javascript) where you think you're referencing one thing... and actually referencing something else.

Re: Refactored PHP engine makes Wordpress 20% faster

#109

Earlier quoted context omitted.

> No, but I can name a lot of things that are way easier and cleaner to do in Python than in PHP. Please do.

I can name two. First, list comprehensions. In PHP, what you might write as this: $image_urls = []; foreach ($images as $image) { $image_urls[] = 'illos/' . $image['url']; } can just be this in Python: image_urls = ['illos/' + x['url'] for x in images] And, closures in Python -- and to be fair, just about any language that isn't PHP -- close over variables in the scope they're defined automatically, without having to…

[deleted]

Re: Refactored PHP engine makes Wordpress 20% faster

#110
post #106

Earlier quoted context omitted.

Nobody cares about today; everybody cares about tomorrow. If you've closely monitored the developments around HHVM and applied knowledge from past experience with successfully managed projects, you'd have zero doubt that HHVM has all components of being widely successful. It will never reach 100%, but for larger projects, it will be preferred just like many go thru the trouble of implementing Nginx + PHP-FPM vs stock…

Just like the original HipHop C++ compiler I guess?

No, not anymore. All you guys comment negatively and cowardly silently downvote and I'm sure most of you haven't even bothered to look into HHVM.
Post reply on HN