Re[2]: [PHP] classes v. functions

From: Date: Thu, 24 Jul 2003 02:04:19 +0000
Subject: Re[2]: [PHP] classes v. functions
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-156575@lists.php.net to get a copy of this message
Hi, MM> troll. :) MM> Execution speed is most definitely /not/ all that matters, though it MM> really depends on the situation. It is often cheaper to throw MM> CPU/storage/RAM at a problem than it is to spend more developer time, MM> especially when one of the considerations is future maintenance or MM> upgrades. In regards to education, OOP-techniques and other lisp-isms MM> evolved in academic settings, in response to concerns about code MM> portability, maintenance, and elegance. Academic code frequently MM> sacrifices speed in the service of technique. I have just done a test to see how much is lost with using classes by changing a template class I use back to functions and globals. Over 10 iterations of a template file with 100 blocks the average speedup per iteration was 1.8ms on a total of 19ms (the class version) So the gains made by using a class structure far outway any loss of speed in my opinion. -- regards, Tom

« previous php.general (#156575) next »