[issue38328] Speed up the creation time of constant list literals.

2019-11-11 Thread Brandt Bucher
Brandt Bucher added the comment: I have created a new patch (PR 17114) that performs this optimization directly in the compiler, rather than the peephole optimizer. I think I like the new one better. -- ___ Python tracker

[issue38328] Speed up the creation time of constant list literals.

2019-11-11 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16621 pull_request: https://github.com/python/cpython/pull/17114 ___ Python tracker ___

[issue38328] Speed up the creation time of constant list literals.

2019-10-21 Thread Brandt Bucher
Change by Brandt Bucher : -- pull_requests: +16423 pull_request: https://github.com/python/cpython/pull/16878 ___ Python tracker ___

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay, but first I want to solve an issue with list overallocation. -- ___ Python tracker ___

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: ...unless you'd prefer that I add them to this PR. But I think it's a better idea to add and review them separately. -- ___ Python tracker

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: Yes, I was thinking about that (and BUILD_CONST_KEY_MAP as well). I'll open another PR with those as soon as this one is in. -- ___ Python tracker

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Great! I withdrew the original proposition in issue33325 because the part of the optimization was not so good as I expected. But this part is good. $ ./python -m timeit "[$(seq -s, 10)]" 500 loops, best of 5: 75.5 nsec per loop $ ./python -m timeit

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
Change by Brandt Bucher : -- keywords: +patch pull_requests: +16087 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16498 ___ Python tracker ___

[issue38328] Speed up the creation time of constant list literals.

2019-09-30 Thread Brandt Bucher
New submission from Brandt Bucher : The attached PR contains a small change to the peephole optimizer that converts sequences of: LOAD_CONST(a), LOAD_CONST(b), ..., BUILD_LIST(n) to LOAD_CONST((a, b, ...)), BUILD_LIST_UNPACK(1) The improvement quickly becomes significant for lists larger