6 ms·
PHP 5.7 now nearly twice as fast as PHP 5.6
- Karellen 12y ago"The secret to this performance increase is that nearly 60% of cpu instructions have been “retired” by more efficient code:" 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.
- michaelx386 12y agoThat quote might be by RiderOfGiraffes: https://news.ycombinator.com/item?id=1626405 https://news.ycombinator.com/item?id=1626405
- nerdy 12y agoSimilarly, "It's hardware that makes a machine fast. It's software that makes a fast machine slow." -Craig Bruce
- voidlogic 12y agoTo be far you can get speed ups like this going from very a very cache unfriendly instruction stream to a very cache aligned one or my changing your instruction mix while maintaining a similar number of total operations ; so this statement is not as "Captain Obvious" as it looks at first glance. Of course, not running extra instructions is better :)
- Tossrock 12y agoSure you can, it's called overclocking.
- er0k 12y agoThat reminds of this quote from Mike Haertel: The key to making programs fast is to make them do practically nothing. ;-)
- elwell 12y agoParallel processing is doing less?
- ck2 12y agoWe're going to need a HHVM 3.2 vs PHPNG benchmark showdown. PHPNG is far easier to install/configure though.
- wnevets 12y agobut its not PHP 5.7
- ck2 12y agoThere is some confusion over the version naming because the version file inside phpng says 5.7.0 - but that might just be a placeholder: https://github.com/php/php-src/blob/phpng/main/php_version.h https://github.com/php/php-src/blob/phpng/main/php_version.h #define PHP_VERSION "5.7.0-dev"
- sarciszewski 12y agoWhether it's 5.7 or 6.0 (or as one suggestion pegged it, 7.0), it's still phpng :)
- wnevets 12y agoI get down-voted for stating a fact, welcome to hacker news.
- poopsintub 12y agoThe increasing douchebaggery of this site seems to be unwelcoming to even comment anymore.
- poopsintub 12y agoMy point exactly.
- jqueryin 12y agoWhat seems to be a competition between HHVM and PHPNG performance optimizations is only going to be a net benefit for the community. A near 100% increase is definitely nothing to shake a stick at. I can only hope these optimizations continue in the future!
- ihsw 12y agoPHP-5.6 isn't even out yet.
- jbrooksuk 12y agoSo?
- drakaal 12y agoThe author doesn't seem to say anything accurate. This isn't going to be 5.7. My understanding is that since there is something that is not this that is 6.x and that since this would be a major rev that this is more likely to be 7.x than 5.7 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"
- ck2 12y agoWhy not read the wiki and notice how Dmitry is trying different ideas for performance improvements? It started with memory optimizations but there are now many other little things like JIT regex. 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.
- smileysteve 12y ago> Will Wordpress be faster? 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.
- mfonda 12y agoSome clarification here about PHP versioning: the next minor version of will be PHP 5.6, which is still under development and has not yet been released. What is referred to as PHP 5.7 here is phpng, a proposed next major version of PHP. There's a lot of confusion about version naming of PHP, so it would be great if the author and HN could fix the title of this post (i.e. s/PHP 5.7/phpng/) as soon as possible to prevent spreading any further misinformation.
- colinramsay 12y agoYes, I found this out after I submitted the link. It's a little frustrating that someone (the blog post author) who is so interested and seemingly involved in this wasn't aware of this fact.
- aikah 12y agoJust quoting ircmaxellAnthony who is kind of a PHP authority > "Calling this 5.7 is bad."
- skore 12y agoUnfortunately, judging from my own (very limited) speed tests, that result simply means that it is en par with PHP 5.5. 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.
- ck2 12y agoPerhaps you are configuring them differently. 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.066s
- nikic 12y agoCommon mistakes: Testing with xdebug enabled in one version or testing with opcache enabled in only one version.
- skore 12y agoI was testing with: PHP 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).
- ck2 12y agoNote RC3 is about to ship so maybe try that. Is xdebug load neutral? Maybe you need to skip loading that during testing, you wouldn't use it during production?
- deleted 12y ago[deleted]