]> granicus.if.org Git - python/commit
SF bug #1085744: Performance issues with PySequence_Tuple()
authorRaymond Hettinger <python@rcn.com>
Thu, 16 Dec 2004 10:38:38 +0000 (10:38 +0000)
committerRaymond Hettinger <python@rcn.com>
Thu, 16 Dec 2004 10:38:38 +0000 (10:38 +0000)
commit4d01259fb262e7eb035b56ae70637884ef4e8cd8
tree215dc207de652cf3b9b2d6b42b30e3e10c346f5e
parent8a6a59c58b70df6f3f230ddf575b5af0eb0a2fb6
SF bug #1085744:  Performance issues with PySequence_Tuple()

* Added missing error checks.
* Fixed O(n**2) growth pattern.  Modeled after lists to achieve linear
  amortized resizing.  Improves construction of "tuple(it)" when "it" is
  large and does not have a __len__ method.  Other cases are unaffected.
Objects/abstract.c