It may well depend on the size and number of the strings, since the
main inefficiencies can be piling up of immutable strings and
subsequent GC. And like they say, there's "lies, damn lies, and
statistics"...

d

On Tue, Nov 9, 2010 at 10:10 AM, Larry Lyons <larrycly...@gmail.com> wrote:
>
>>Yes, cfsavecontent appears to use a java buffer internally, and runs
>>just about as fast. Pick whichever method gives you code you like
>>better with your content, its source, and your coding style.
>>
>>Dave
>>
>
> Its actually faster according to the tests I've seen. Both ArrayAppend and 
> cfsaveContent came out the fastest in John Whish's testing on CF8 (see 
> http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/string-concatenation-performance-test-128).
>  In most cases both of these were faster than StringBuilder or StringBuffer.
>
> concatenate with coldfusion : 6797ms
> listappend with coldfusion : 21344ms
> arrayappend with coldfusion : 47ms
> coldfusion with save content: 47ms
> concatenate with java stringbuffer : 62ms
> concatenate with java StringBuilder : 63ms
>
> Some time or other I'll have to try John's test case under load with jMeter 
> and see what the performance is actually like.
>
> regards,
> larry
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339066
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to