PHP 5.7 now nearly twice as fast as PHP 5.6
ckon.wordpress.com
ckon.wordpress.com
Then there is the magic "100% faster" but there isn't an explanation of what makes it faster, or what types of things will be faster. Is it faster for Computation? Faster for String manipulation? Is this mostly just memory access? Will Wordpress be faster? or things build on Zend? Or Drupal? Who will see this be faster?
I want to be excited. I don't really like PHP but I support a lot of it, and speed and stability would be great things to have improved, but I want a "why" that goes beyond, "The secret to this performance increase is that nearly 60% of cpu instructions have been “retired” by more efficient code"
It is all listed in the wiki and other ideas not attempted yet that might make it even faster.
Obviously not all code is going to be twice as fast, it is an average in a large program like wordpress. Some things more than twice as fast, some not so much.
The content uses 1000 renderings of WP Front Page as to what it is measuring.
> what makes it faster?
The key aspect this post uses is cpu instructions and it drops by nearly 30%.
This definitely answers at least these two questions of yours.
PHPNG is far easier to install/configure though.
> "Calling this 5.7 is bad."
https://github.com/php/php-src/blob/phpng/main/php_version.h
#define PHP_VERSION "5.7.0-dev"That said, while both you and ircmaxell (who is a commenter on the article's page and very involved in the PHP community) can be a bit terse when making assertions it doesn't make you wrong. I can't possibly see this being labeled 5.x and the 6.x major version number is inseparably bound to the 5-year-old vaporware.
Hacker News used to be a great place for open discussion. Now, anything even slightly against the silicon valley hive-mind is downvoted.
Any time PHP comes up, there are tons of garbage comments stating how terrible of a language it is. This is not constructive in any way and adds nothing to the discussion. No downvotes in sight. Why? Because the downvoting is only used as a tool to silence opposing viewpoints. It has almost nothing to do with keeping out the trolls.
I guess I shouldn't be surprised. It's almost a perfect mirror of our society today. Just look at all of the people getting fired and having their careers ruined for merely having opposing viewpoints to the special interest groups in the US.
It corrected itself, and the post is fine now. Complaining about down votes, however, should be discouraged.
> Hacker News used to be a great place for open discussion. Now, anything even slightly against the silicon valley hive-mind is downvoted.
I've been bearing that since I joined.
> Because the downvoting is only used as a tool to silence opposing viewpoints.
That's not true.
Coming into a thread still going on, you're just getting a snapshot. Yes, there will be up votes and down votes, but I find that generally things get corrected in the end.
However, contributing to the problem by complaining about down votes doesn't help matters. It makes them worse.
What's interesting is that the comment getting down voted now: "I get down-voted for stating a fact, welcome to hacker news.", is false in every way.
So my comment is correct, the title is not.
Well, where else was the speed-up going to come from?
"You can't actually make computers run faster, you can only make them do less."
-- Unknown (My gratitude if anyone does know the source of this quote)
Clearly, "doing less" does include things like "(re-)fetching a bunch of bits into the cache", but "executing fewer instructions" is definitely one of the most obvious places to start.
"It's hardware that makes a machine fast. It's software that makes a fast machine slow."
-Craig Bruce
The key to making programs fast is to make them do practically nothing. ;-)
PHP 5.6 is not only not finished yet - it is, in my experience, also the worst performing version you could choose. Not sure that's a good idea.
I have a test box with all recent 5.x versions installed.
1000 WP front pages, identical php build configuration:
5.4 28.081s, 28.673s, 29.458s, 28.017s
5.5 26.402s, 26.448s, 26.522s, 26.523s
5.6 25.774s, 25.643s, 25.752s, 25.670s
NG 15.083s, 15.100s, 15.052s, 15.066sPHP 5.6.0beta4 (cli) (built: Jun 12 2014 14:13:53)
Zend Engine v2.6.0-dev, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
vs.
PHP 5.5.13 (cli) (built: Jun 12 2014 13:54:54)
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
...but, as I said - this is with very limited testing, basically just on Travis (which goes up and down in speed all day, but the difference between versions is pretty steady).
Is xdebug load neutral? Maybe you need to skip loading that during testing, you wouldn't use it during production?