RE: [PHP] Re: Replacing a space with an underscore
| From: | John W. Holmes | Date: | Thu, 01 May 2003 18:13:14 +0000 |
| Subject: | RE: [PHP] Re: Replacing a space with an underscore | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145994@lists.php.net to get a copy of this message | ||
> Benchmarking is surely only related to your specific server setup.
Exactly. I was only providing my results.
> > Str_Replace Method: 0.00233495235443 (Avg: 0.00253650387128)
> > Query Method: 0.00189101696014 (Avg: 0.00206401030223)
>
> I can't decide which method you are agreeing with, your benchmark
> and my own show the sql replace method to be faster...
Yes, it does, for that limited test. Again, someone should benchmark
their own solution to see what works best for them.
> > You should always benchmark your own solutions. If you have a
database
> > heavy application, then I wouldn't tax the database with the extra
work
> > of taking care of the spaces for you.
>
> It depends on your setup.
Exactly. I think we're actually agreeing here. :)
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/