[issue9800] Fast path for small int-indexing of lists and tuples

2013-03-28 Thread Georg Brandl
Georg Brandl added the comment: Closing this old pending issue due to lack of activity. -- keywords: +needs review -patch nosy: +georg.brandl resolution: -> rejected status: pending -> closed ___ Python tracker ___

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the approach in issue10044 is better. -- status: open -> pending ___ Python tracker ___ ___

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I did some spelunking. Guido committed the similar optimization in r8306. > The diff is at: > http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306 > > His commit message was: > > Huge speedup by inlining some common integer operati

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-05 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: I did some spelunking. Guido committed the similar optimization in r8306. The diff is at: http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306 His commit message was: Huge speedup by inlining some common integer operations: int

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-05 Thread Aahz
Aahz added the comment: Wasn't me! And I've spent too little time on python-dev lately to remember stuff like this. :-( -- nosy: +Aahz ___ Python tracker ___ __

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: At any rate, I believe this used to be a fast-path. IIRC, Aahz put it in after demonstrating a considerable speed boost for common cases. Aahz, do you have any institutional memory around this one? -- nosy: +aahz

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: As I mentioned, the speedup is invisible anyway, so it's not really a "fast path" ;) -- ___ Python tracker ___

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: In the past, we've allow ceval.c to peer through encapsulation in order to have fast paths. -- ___ Python tracker ___ __

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: A disadvantage of the patch is that ceval.c needs to know about the internal implementation of a PyLong. At the moment, this information is encapsulated only in Objects/longobject.c and a couple of other places (I think marshal.c). -- __

[issue9800] Fast path for small int-indexing of lists and tuples

2010-10-02 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: For what it's worth, a similar fast path existed in Python 2 for lists (but not tuples). It was removed for Python 3. I'm not sure why it was removed, but it may have been part of removing the PyInt type. -- nosy: +stutzbach _

[issue9800] Fast path for small int-indexing of lists and tuples

2010-09-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is an experiment which turns out to yield little benefits, except on micro-benchmarks such as: $ ./python -m timeit -s "a=[1,2,3]" "a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1];a[-1];a[0];a[1