|
Posted by Andy Jeffries on 06/21/06 13:15
On Wed, 21 Jun 2006 15:00:41 +0200, Bent Stigsen wrote:
> Bugger. I'm a bit surprised it's slower, but that much. Useless piece of
> [bleep].
>
> Did you run it more than once. I mean, it couldn't have been some other
> app. hogging the cpu, at that moment.
I've run it more than once. In my latest set of timings I get:
PREG Replace: 0.1889 seconds
Bent's Function call: 1.8074 seconds
> You do strpos twice, and it can bee squeezed a bit.
>
> Try this instead:
Bent's 2nd version Function call: 0.3320 seconds
Much faster, nearly competitive with preg and it gives the correct output.
Cheers,
Andy
--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos
Navigation:
[Reply to this message]
|