[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-15 Thread Guido van Rossum
Guido van Rossum added the comment: Way to go Irit!-- --Guido (mobile) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-15 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-15 Thread Mark Shannon
Mark Shannon added the comment: New changeset 641345d636320a6fca04a5271fa4c4c5ba3e5437 by Irit Katriel in branch 'main': bpo-26280: Port BINARY_SUBSCR to PEP 659 adaptive interpreter (GH-27043) https://github.com/python/cpython/commit/641345d636320a6fca04a5271fa4c4c5ba3e5437 --

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Here is my previous attempt at this, for reference: https://github.com/python/cpython/pull/9853 -- nosy: +pablogsal ___ Python tracker

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +25602 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/27043 ___ Python tracker ___

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Irit Katriel
Irit Katriel added the comment: Sure, I'll have a look. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Guido van Rossum
Guido van Rossum added the comment: Very much so. Irit, do you want to give it a try? (Note there are helpful instructions now in Python/adaptive.md.) -- ___ Python tracker

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2021-07-05 Thread Irit Katriel
Irit Katriel added the comment: This looks like a case of specialization. -- nosy: +Mark.Shannon, gvanrossum, iritkatriel ___ Python tracker ___

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2017-05-26 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2016-02-29 Thread STINNER Victor
Changes by STINNER Victor : -- title: ceval: Optimize list -> ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7 ___ Python tracker

[issue26280] ceval: Optimize list

2016-02-29 Thread Zach Byrne
Zach Byrne added the comment: The new patch "subscr2" removes the tuple block, and addresses Victor's comments. This one looks a little faster, down to 0.0215 usec for the same test. -- Added file: http://bugs.python.org/file42049/subscr2.patch ___

[issue26280] ceval: Optimize list

2016-02-18 Thread Zach Byrne
Zach Byrne added the comment: Is it worth handling the exception, or just let it take the slow path and get caught by PyObject_GetItem()? We're still making sure the index is in bounds. Also, where would be an appropriate place to put a macro for adjusting negative indices? --

[issue26280] ceval: Optimize list

2016-02-16 Thread STINNER Victor
STINNER Victor added the comment: I suggest to try to inline PyList_GetItem: use PyList_GET_ITEM and raise the exception manually if needed. I'm not sure that it's ok to add PyLong_AsSize_t() to the slow path. Copy the code in each if? A macro can help. -- title: ceval: Optimize

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2016-02-16 Thread Zach Byrne
Zach Byrne added the comment: Here's a patch that looks likes Victor's from the duplicate, but with tuples covered as well. I ran some straight forward micro benchmarks but haven't bothered running the benchmark suite yet. Unsurprisingly, optimized paths are faster, and the others take a

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2016-02-05 Thread STINNER Victor
STINNER Victor added the comment: Oh, I just created a duplicate with a patch for list[int]: issue #26301. -- ___ Python tracker ___

[issue26280] ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7

2016-02-05 Thread STINNER Victor
Changes by STINNER Victor : -- title: ceval: Optimize [] operation similarly to CPython 2.7 -> ceval: Optimize list[int] (subscript) operation similarly to CPython 2.7 ___ Python tracker