On May 25, 6:19 pm, [EMAIL PROTECTED] wrote: > Is there any place outside the actual C source for Python that has > information about the performance of Python's built-in operations? For > example, I'd *expect* list.append to be O(1), and I hope that list[i] > is O(1), but I don't really know that for sure, since it would depend > a lot on the internal implementation. > > I'm really only asking this for curiosity's sake --- more as a > reasonable, non-trollish version of the "Python is slow" post than > anything. :-) I've never really had any problems with the performance > of Python code that I couldn't solve by either changing my algorithm > or, if all else has truly failed, rewriting in C or Pyrex. > > What I'd like to see is something > likehttp://svn.python.org/projects/python/trunk/Objects/listsort.txt > where Python's sorting algorithm is described, except with the focus > on other built-in constructs.
http://wiki.python.org/moin/TimeComplexity is a start. > > Thanks! -- http://mail.python.org/mailman/listinfo/python-list