> I'm very intresting in achiving high performances with my scripts. > I have a couple of questions about performance. > When passing arrays (they are not very huge anyway) to a function, passing > them as reference is faster, isn't it ?
No > And when I have a chain of ifs, is ti better (from the performance point of > view) to change it for a switch ? It really doesn't matter. You are focusing on the wrong bits here. Look at the architecture of your app. Make sure any database calls are optimal and look at using a reverse-proxy cache out in front of your system and sending appropriate cache headers. Or break up your app into stuff that can be cached and stuff that can't and look at something like pear/Cache_Lite or roll your own that is specific to your application. All of these will give you order of magnitude speedups while what you are worrying about won't even be measurable. We can argue all day long about the theoretical speed of passing by reference vs. pass by value, but in the end you won't be able to measure it. PS. Please, don't pgp-sign mailing list messages. See this link for some tips on using the PHP mailing lists: http://www.php.net/mailing-lists.php -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php