Monthly Archives: October 2010

Todays lesson: Check your assumptions

It’s easy to make assumptions about what we think is the problem with the speed of our code. Lets say you have a loop like so: foreach( $big_list_of_things as $thing ) { $res1 = somefunc1( $thing ); $res2 = somefunc2( $thing ); $res3 = somefunc3( $thing ); $res4 = somefunc4( $thing ); } Since its [...]