News for hackers. Stuff that matters.
Re:Efficient String Concatenation in Python by pdonis on Saturday September 07, 2013 @05:16PM (#6346660)
Does join scan the entire input to know the exact size and allocate that at the start?

No, because that would make the algorithm quadratic again (one loop for the scan, second loop for the concatenation), and the whole point of the join idiom, as recommended by the Python documentation, is to avoid a quadratic algorithm.

Re:Efficient String Concatenation in Python by thomasahle on Saturday September 07, 2013 @05:21PM (#6346672)
Two loops are still linear as long as they are not nested ;-)
Re:Efficient String Concatenation in Python by pdonis on Saturday September 07, 2013 @07:01PM (#6346970)
Oops, yes, good point. :)