Re: Re: new manual chapter suggestion

From: Date: Thu, 02 Aug 2001 09:44:53 +0000
Subject: Re: Re: new manual chapter suggestion
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-61811@lists.php.net to get a copy of this message
On Monday, July 30, 2001, at 12:34 AM, Hojtsy Gabor wrote:
I see some sources, where beginners used twenty str_replace's instead of
one
preg_replace, because somebody said to them str_replace is faster then preg_replace...
Reasonable. Goba
I see the opposite, in some ways... 8 ereg_replace() plus test statements where one stripslashes() would do the trick... (when you come from perl, and you have to do everything with regexp's, it seems 'natural' to do lot's of them...) An idea I've toyed with, for a while: benchmarking and "costing" each function, so somebody could add up the "cost" of a page. Disk hits have a cost, regexps have a cost, even lowly strtoupper has a cost... How can we guide programmers to the path of least "cost"? What techniques can we use to determine "cost"? -Ronabop --2D426F70|759328624|00101101010000100110111101110000 ron@opus1.com, 520-326-6109, http://www.opus1.com/ron/ The opinions expressed in this email are not necessarily those of myself, my employers, or any of the other little voices in my head.

« previous php.dev (#61811) next »