Re: Remove punctuation
| From: | John Nichel | Date: | Thu, 09 Sep 2004 19:44:50 +0000 |
| Subject: | Re: Remove punctuation | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196249@lists.php.net to get a copy of this message | ||
John Holmes wrote:
From: "John Nichel" <john@kegworks.com>Yeah...less than 1/2 a second between str and ereg in your tests for 50,000 runs, works out to what? 1/500,000 of a second per single instance? Not worth losing sleep over...whatever yer comfortable with I say. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.comNot that speed tests like this really matter in the long run of your code, but: str_replace: 0.26480603218079 ereg_replace: 0.61685109138489 preg_replace came in at about 0.4, btwi think str_replace is faster that ereg_replaceWe tested that theory a while back on here (I don't remember the subject of the emails, so finding it would be kind of hard), and it came out to be almost exactally the same speed.