socket send O(N**2) complexity

Zac Burns zac256 at gmail.com
Mon Sep 21 17:55:43 EDT 2009


On Mon, Sep 21, 2009 at 2:10 PM, Rob Williscroft <rtw at freenet.co.uk> wrote:
>  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/
> --
> http://mail.python.org/mailman/listinfo/python-list
>

Thanks! The buffer object was exactly the 'slice view' that I was
looking for to fix my version of the algorithm.

--
Zachary Burns
(407)590-4814
Aim - Zac256FL
Production Engineer (Digital Overlord)
Zindagi Games



More information about the Python-list mailing list