Re: [Python-Dev] Complexity documentation request

2008-03-15 Thread Dimitrios Apostolou
Correcting myself: Dimitrios Apostolou wrote: > Hi, > > I just dug into the source code looking for complexity of set > operations. In the wiki page I documented an interesting finding, that > it is different to do s-t and s.difference(t). It is also interesting it is diff

Re: [Python-Dev] Complexity documentation request

2008-03-15 Thread Dimitrios Apostolou
Hi, I just dug into the source code looking for complexity of set operations. In the wiki page I documented an interesting finding, that it is different to do s-t and s.difference(t). It is also interesting that you can do the first only for sets, but the second for every iterable in t. Are t

Re: [Python-Dev] Complexity documentation request

2008-03-13 Thread Dimitrios Apostolou
Daniel Stutzbach wrote: > On Wed, Mar 12, 2008 at 2:52 PM, Dimitrios Apostolou <[EMAIL PROTECTED]> > wrote: >> Just one quick note. What exactly do you mean by "Amortized worst case"? >> Shouldn't it just be "Worst case"? I think that t

Re: [Python-Dev] Complexity documentation request

2008-03-12 Thread Dimitrios Apostolou
Daniel Stutzbach wrote: > I just created a very basic one at > http://wiki.python.org/moin/TimeComplexity?action=show Hi, Just one quick note. What exactly do you mean by "Amortized worst case"? Shouldn't it just be "Worst case"? I think that the word "amortized" better describes the time compl

Re: [Python-Dev] Complexity documentation request

2008-03-11 Thread Dimitrios Apostolou
Daniel Stutzbach wrote: > On Sun, Mar 9, 2008 at 9:22 AM, Aahz <[EMAIL PROTECTED]> wrote: >> There probably would be some value in a wiki page on python.org that >> provides this information, particularly across versions. You may be >> able to find volunteers to help on comp.lang.python. > > I

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Dimitrios Apostolou
Fred Drake wrote: > On Mar 9, 2008, at 10:22 AM, Aahz wrote: >> This has been discussed before and rejected for two reasons: >> >> * Other Python implementations (Jython, PyPy, IronPython) may not be >> able to provide the same type implementations >> >> * Algorithmic information does sometimes cha

Re: [Python-Dev] Complexity documentation request

2008-03-10 Thread Dimitrios Apostolou
Hello again, Guido van Rossum wrote: > Well, there you have hit the nail on the head -- should we document > the actual or the guaranteed O() expression? I think this is a can of > worms better left unopened. At best we should include some hints to I will open this can and say that average case c

[Python-Dev] Complexity documentation request

2008-03-08 Thread Dimitrios Apostolou
Hello all, Is it possible to include algorithm complexity information for the various built-in types (strings, sets, lists, dictionaries...)? This would ease the decision for choosing the correct type. The information could simply be added as a new column in the tables found on pages as the fol