[issue47005] Improve performance of bytes_repeat

2022-03-13 Thread Pieter Eendebak
New submission from Pieter Eendebak : The bytearray_repeat and bytearray_irepeat are inefficient for small arrays and a high number of repeats. This can be improved by using the same approach is in the corresponding bytes_repeat method. Microbenchmark: python -m pyperf timeit "b=byte

[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Pieter Eendebak
New submission from Pieter Eendebak : The array_inplace_repeat is inefficient for small arrays and a high number of repeats. This can be improved by using the same approach as in https://bugs.python.org/issue47005 -- components: Interpreter Core messages: 415572 nosy: pieter.eendebak

[issue47070] Improve performance of array_inplace_repeat

2022-03-19 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31999 ___ Python tracker <https://bugs.python.org/issu

[issue47091] Improve performance of list and tuple repeat methods

2022-03-22 Thread Pieter Eendebak
New submission from Pieter Eendebak : Approach is similar to https://github.com/python/cpython/pull/31856 and https://github.com/python/cpython/pull/31999 -- components: Interpreter Core messages: 415762 nosy: pieter.eendebak priority: normal severity: normal status: open title

[issue47091] Improve performance of list and tuple repeat methods

2022-03-22 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30135 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32045 ___ Python tracker <https://bugs.python.org/issu

[issue47091] Improve performance of list and tuple repeat methods

2022-03-22 Thread Pieter Eendebak
Pieter Eendebak added the comment: The special case of a repeat with n=1 does not use memcpy. An implementation with it showed no performance improvement. -- ___ Python tracker <https://bugs.python.org/issue47

[issue47110] Refactor bytearray strip methods

2022-03-24 Thread Pieter Eendebak
New submission from Pieter Eendebak : The bytearray strip, lstrip and rstrip methods contain a lot of duplicated code. -- components: Interpreter Core messages: 415939 nosy: pieter.eendebak priority: normal severity: normal status: open title: Refactor bytearray strip methods versions

[issue47110] Refactor bytearray strip methods

2022-03-24 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30180 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32096 ___ Python tracker <https://bugs.python.org/issu

[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-25 Thread Pieter Eendebak
New submission from Pieter Eendebak : In https://github.com/python/cpython/pull/31867 the method _PyLong_FromUnsignedChar was introduced for faster conversion of byteaarray elements. We can use the method in more places -- components: Interpreter Core messages: 415991 nosy

[issue47116] Use _PyLong_FromUnsignedChar in bytearrayobject.c

2022-03-25 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30187 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32110 ___ Python tracker <https://bugs.python.org/issu

[issue47251] Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE

2022-04-07 Thread Pieter Eendebak
New submission from Pieter Eendebak : The implementations of BINARY_SUBSCR_LIST_INT and BINARY_SUBSCR_TUPLE_INT are almost identical. They can be merged, so there is one opcode less and the code is shared. -- components: Interpreter Core messages: 416937 nosy: pieter.eendebak

[issue47251] Merge BINARY_SUBSCR_LIST_INT with BINARY_SUBSCR_LIST_TUPLE

2022-04-07 Thread Pieter Eendebak
Change by Pieter Eendebak : -- keywords: +patch pull_requests: +30429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32404 ___ Python tracker <https://bugs.python.org/issu