2 ms·
You know what's much, much faster but no-one will ever recommend? Globals instead of copying gobs of data between classes. For example WordPress used to use a
by ck2 15y ago
You know what's much, much faster but no-one will ever recommend?
Globals instead of copying gobs of data between classes.
For example WordPress used to use a global object cache that was passed around by pointer reference. Modern versions now throw around multiple copies of huge gobs of data by copying it back-and-forth over and over again, like all the users and posts and comments on a page. Makes a HUGE performance decrease that is easily measured on complex pages (200-300% slower). If you have frequent cache misses it's quite a workout for the system.
- eropple 15y agoMost applications I see just reference-copy. This article is really, really rudimentary, and not in the good ways. Why does it recommend "not copying data" without explaining references? Why is _Google_ recommending the use of bare mysql_query? I don't care if it's a toy example, they should be reinforcing best practices (or at least not-horrible practices) by using PDO or something similar. Granted, most PHP programmers I know are not particularly competent. (I am, but I'm also weird enough to be willing to get competent with something like PHP.) But we can at least _try_ to hammer good practices into them.