PHP Team Responds to Google's PHP Tips
groups.google.com
PHP Team Responds to Google's PHP Tips
1–10 of 40 posts
Re: PHP Team Responds to Google's PHP Tips
#2I'm currently involved in a project at work which requires translating a (Java) coding standards document. I have filed probably two dozen bugs against the document that sound like "The rationale for standard 2.4.3 is translated correctly from the Japanese but contrary to technical fact." They include my personal favorite Java performance tip "Don't use the nice readable str + str syntax to concatenate, instead, use StringBuilder."
Re: PHP Team Responds to Google's PHP Tips
#3I was waiting for that. The history of micro-optimization is replete with myths and legends which sound juuuuuuust plausible enough to be true (or were true a decade ago) and endure to this day. I'm currently involved in a project at work which requires translating a (Java) coding standards document. I have filed probably two dozen bugs against the document that sound like "The rationale for standard 2.4.3 is transla…
The only thing worse than an article about micro-optimization is one that is both out of date and almost entirely backwards.
Re: PHP Team Responds to Google's PHP Tips
#4Re: PHP Team Responds to Google's PHP Tips
#5Is 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?
Re: PHP Team Responds to Google's PHP Tips
#6"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?
Re: PHP Team Responds to Google's PHP Tips
#7Re: PHP Team Responds to Google's PHP Tips
#8Re: PHP Team Responds to Google's PHP Tips
#9Good resources (written by the guys who actually work on the php engine):
http://ilia.ws/files/phptek2007_performance.pdf (13 MB)
http://ilia.ws/files/phpquebec_2009.pdf ( 1.1 MB )
edit: added file size
Re: PHP Team Responds to Google's PHP Tips
#10"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?
If I was going to guess, I'd say that double quoted strings are passed to a different "engine" than the single quotes, and perhaps over time the double quote engine has received better optimization.
Must be some kind of caching optimization and not really something that saves CPU cycles