Thanks for the correction.  I didn't pause to think as I
wrote that...

-Peter
 

> -----Original Message-----
> From: Aaron Bingham [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 29, 2005 11:24
> To: Peter Hansen
> Cc: python-list@python.org
> Subject: Re: Optimisation Hints (dict processing and strings)
> 
> Peter Hansen <[EMAIL PROTECTED]> writes:
> 
> > You've misunderstood the comments about this area.
> > String concatenation is *not* "time consuming".
> > *Repeated* concatenations *will become very time 
> consuming*, along an 
> > exponential curve.  That's what the discussions about O(n^2) are 
> > referring to.
> 
> For the record, O(n^2) is /not/ exponential, but polynomial.  
> A function with exponential complexity would have, e.g. 
> O(A^n) for some constant A, which would be /much/ worse than 
> the behavior of repeated string concatenation.
> 
> Regards,
> 
> --
> --------------------------------------------------------------------
> Aaron Bingham
> Software Engineer
> Cenix BioScience GmbH
> --------------------------------------------------------------------
> 
> 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to