Penny pinching

March 22, 2004

Have you ever gone over your coding changing i += 1 to i++ Lots of people do. In some languages like PHP there are heaps of other things that you can do to shave off a few millisecods from script execution time. Changing double quotes to single quotes, tweaking your includes figure among the most commonly used tactics.

Is it worth it? certainly not in my book. Real speed of any application is a direct result of good architecture and good algorithms. If your logic results in a three table join in your database there's no way that code optmization is going to give you any increase in speed.

This was a recent debate on the PHP general mailing lists. Some pundits started questions along the lines of how do i optimize etc and I gave the above responds. These same pundits then started talking about how millionaires save pennies. If these pundits know so much why do they ask questions in the newsgroups in the first place? Finally Rasmus himself stepped in and said something to the effect that optimizing includes isn't worth it. The pundits had more sense than to argue with Rasmus and I think we have seen the end of that thread.

Posted by raditha at March 22, 2004 2:28 AM
Your Ad Here

 

Jabber  |  Linux  |  mySQL  |  PHP  |  Java  |  Site Map  |  Wiki

Downloads  |  About  |  Links  |  Contact  |  Home

 

Copyright © Raditha Dissanayake 2003 - 2007

Terms of Use  |  Privacy

 

 

March 2004
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31