APC opcode caching absolutely turbo-charges PHP. Quadruple performance.
I'll take your word on it. Since I use an inexpensive (shared) hosting service, how would I go about checking to see if they employ APC opcode (or any other such as listed at http://en.wikipedia.org/wiki/PHP_accelerator ) ? PHP info page doesn't show anything but "Zend optimizer" (which is not a caching optimizer). Are APC or any such accelerators/cache-optimizers commonly used by hosts (silently, without showing up…
PHP Team Responds to Google's PHP Tips
31–40 of 40 posts
Re: PHP Team Responds to Google's PHP Tips
#32"When simple strings with no variables in them are used, the performance is clearly better with double-quoted strings due to implementation details in the engine." Is there any way this could be true except that they went out of their way to slow down single-quoted strings? How could it possibly be slower to do fewer steps?
That doesn't no longer holds true when comparing a non-interpolated double-quoted string and the identical single-quoted string
Tho as others have said, if you're interested enough in optimization to worry about what type of quote you're using, you should just use opcode caching (APC) which will optimizing string parsing along with everything else.
Re: PHP Team Responds to Google's PHP Tips
#33Even if all the tips were valid, the performance gain is tiny in comparison to simply installing an opcode cache (APC/Zend/etc). And even after installing the opcode cache, performance for many web apps doesn't improve much as the bottleneck is often in the DB. Caching DB results where possible (pretty simple to implement with your own code or an external library) often results in far greater performance gain than an…
In very high volumes, tiny performance gains change user behavior.
It is important to have scaling in mind when coding, but that had more to with eliminating 50 SQL queries per request situations - the code itself, certainly in a high level language like PHP, should be written for easy maintenance rather than performance IMHO.
Re: PHP Team Responds to Google's PHP Tips
#34Re: PHP Team Responds to Google's PHP Tips
#35related and helpful - http://www.phpbench.com/
And some of the interpretive comments were more so: saying "little difference" when there was a 2:1 difference.
The fellow does say he continues the work and is open to feedback, so perhaps some of you with more sophistication about benchmarking can check it out?
Re: PHP Team Responds to Google's PHP Tips
#36I feel sorry for all the people who instantly started hacking (as in machete) up their entire app based on this advice.
Re: PHP Team Responds to Google's PHP Tips
#37Re: PHP Team Responds to Google's PHP Tips
#38APC opcode caching absolutely turbo-charges PHP. Quadruple performance.
I'll take your word on it. Since I use an inexpensive (shared) hosting service, how would I go about checking to see if they employ APC opcode (or any other such as listed at http://en.wikipedia.org/wiki/PHP_accelerator ) ? PHP info page doesn't show anything but "Zend optimizer" (which is not a caching optimizer). Are APC or any such accelerators/cache-optimizers commonly used by hosts (silently, without showing up…
Re: PHP Team Responds to Google's PHP Tips
#39APC opcode caching absolutely turbo-charges PHP. Quadruple performance.
Re: PHP Team Responds to Google's PHP Tips
#40pwned
Seriously this was my first reaction, as one of the first posters, Google were pwned.
Guess I have to open a new account now.