Reply to Re: string concat vs. join/implode

Your name:

Reply:


Posted by ZeldorBlat on 05/15/07 14:25

On May 15, 7:14 am, NoWhereMan <nowheremanNOS...@flashmailSPAM.com>
wrote:
> On 14 May 2007 15:02:01 -0700, ZeldorBlat wrote:
>
> > I replaced 10 with 100000 and ran each function through a profiler.
> > The first one (using concatenation) was approximately 25% faster than
> > the one using implode().
>
> nice :)
>
> Could you please repeat the test with a long string isntead of $i?
> maybe a $str .= str_pad($i, 10^10 , "___"); so that you have a very long
> string? of course not a $str .= "My very long long string"; because the
> literal may be evaluated only once, and multi-referenced in the join()
> version, resulting in a quicker computation (I think...)
>
> bye
>
> --
> NoWhereMan (e.v.)
> --http://www.nowhereland.it
> --http://flatpress.nowhereland.it

If you post the code for the two functions you want me to compare I'll
be happy to do so and post the results.

[Back to original 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

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