[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nice! This is an example of good microoptimization. The performance gain is tiny (although measurable), but the cost is virtually zero: it does not increase code complexity and does not have side effects. -- resolution: -> fixed stage: patch

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ef1b88bf57aae93893d55f1b9c9639dbe9cc7786 by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-36062: Minor speed-up for list slicing and copying. (GH-11967)

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- keywords: +patch pull_requests: +11993 stage: -> patch review ___ Python tracker ___ ___

[issue36062] move index normalization from list_slice() to PyList_GetSlice()

2019-02-20 Thread Sergey Fedoseev
New submission from Sergey Fedoseev : list_slice() is used by PyList_GetSlice(), list_subscript() and for list copying. In list_subscript() slice indices are already normalized with PySlice_AdjustIndices(), so slice normalization currently performed in list_slice() is only needed for