You are here: Re: Change alternate commas to semi colons... « PHP Programming Language « IT news, forums, messages
Re: Change alternate commas to semi colons...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация