[Tutor] concat vs join - followup
Kent Johnson
kent_johnson at skillsoft.com
Sat Aug 28 13:39:27 CEST 2004
At 07:53 AM 8/28/2004 +0100, Alan Gauld wrote:
> > It's good to teach best practices, but maybe it's a poor use of time
>to
> > teach this to beginners. I won't be so quick to bring it up next
>time.
>
>Yes, when someone has a performamce problem, that's probably the
>best time to introduce tuning tricks. Until then, if its "fast enough"
>why bother?
Ah, of course. That's probably the most useful way to think about it - it's
an optimization, use it when you know you need it.
>But OTOH the research to find out is interesting.
Yes. It was a good excuse to try out VPython's graphing capability, too :-)
>As a matter of interest I usually use string fomatting
>to build long strings rather than join or concatenation.
>How does that compare for performance? :-)
You don't use string formatting to append in a loop do you?
Kent
More information about the Tutor
mailing list