|
|
|
|
|
by Nicolas___
5212 days ago
|
|
These tips are good practices, but they are micro-optimisations. The function strtr might be 4 times faster than str_replace, but the time saved by using strtr will represent a tiny tiny tiny portion of your script execution time. Micro-optimisations are worth it when everything else is optimized in your application. You might get way better results by focusing on your database structure or the way you store, retrieve and cache your data. What's listed here doesn't lead to "highly efficient code". More like "A tiny little bit more efficient code". Doesn't hurt doing it though. |
|