[Typo3-dev] char <-> string -> overhead -> speed

Michael Johnston mjohnston at planetactive.com
Mon Sep 27 12:56:01 CEST 2004


Hi,

> Thanks for your reply.
> The main intention for that question was NOT to start a discussion 
> about BENCHMARKING. Sorry if that was not that clear!

Fair enough :)

> The question raised when I used the extdeveval extension with the 
> option of transfering all " to '. Because a "\n"!='\n'.
> So there should be a benefit to transfer all strings to char-arrays. 
> For Java I know that is might outperform a string. But for PHP I had 
> no indication that there is a benefit. But perhaps I'm missing some 
> articles/source about PHP optimization.
>
> So how would this perform "TextTextTextText\n".$bob.$bob ?
> I'm interested in the advantages of doing/programming things in one 
> way   or another. Any hint is highly appricated.

I haven't measured it, but that is what I use, though more out of habit 
because it's the way strings work in most other languages, than out of 
a belief that it will be significantly more efficient.

Michael Johnston
Planetactive





More information about the TYPO3-dev mailing list