[issue39829] __len__ called twice in the list() constructor

2022-03-13 Thread Jeremiah Pascual
Change by Jeremiah Pascual : -- versions: +Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue39829> ___ ___ Python-bugs-list mailin

[issue39829] __len__ called twice in the list() constructor

2022-03-12 Thread Jeremiah Pascual
Jeremiah Pascual added the comment: > Looks good to me. Would you create a pull request? Created a pull request (31816). -- ___ Python tracker <https://bugs.python.org/issu

[issue39829] __len__ called twice in the list() constructor

2022-03-11 Thread Jeremiah Pascual
Change by Jeremiah Pascual : -- keywords: +patch pull_requests: +29914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31816 ___ Python tracker <https://bugs.python.org/issu

[issue39829] __len__ called twice in the list() constructor

2022-03-10 Thread Jeremiah Pascual
Jeremiah Pascual added the comment: Matt's idea leads to some speedups when implemented correctly (pardon me but I have no idea how to use pyperf): list({}): Mean +- std dev: [orig] 109 ns +- 1 ns -> [modif] 103 ns +- 1 ns: 1.06x faster list({1: 2}): Mean +- std dev: [orig] 125 ns