socket send O(N**2) complexity

Rob Williscroft rtw at freenet.co.uk
Mon Sep 21 17:10:47 EDT 2009


 wrote in news:mailman.216.1253565002.2807.python-list at python.org in 
comp.lang.python:

>>Niether of the CPython versions (2.5 and 3.0 (with modified code))
>>exibited any memory increase between "allocated 1 meg + " and "end"
> 
> You bumped into a special case that CPython optimizes.  s[:] is s.  If 
> you repeat your test with s[1:], you'll see memory climb as one might 
> normally expect.
> 

Thanks for the correction (to Jack also)

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/



More information about the Python-list mailing list