On 2012-07-10 16:49, Dmitry Olshansky wrote:

I'm not sure how map can fit there. If anything you need a foreach (and
you have it;) ) to build a _string_. I'd rather output ',' right there
inside of loop. Thus avoiding costly join and appending to a new buffer
on each iteration.

Sure if remove the call to "join" and build a single string from the beginning, then a foreach would be the right approach.

But if you look at the code as it is now the foreach-loop maps an array of "Parameter" to an array of "string".

Speed and generality. Think removing temporary arrays. And while a lot
of folks won't every use things other then arrays power users sure as
hell would.

I have only been able to remove very few temporary arrays.

--
/Jacob Carlborg


Reply via email to