-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-43950: optimize column table assembling with pre-sizing the column table #26997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that this speeds up the allocation quite a lot as expected 👍
❯ time ./python -m test test_compile -m test_stack_overflow -v
== CPython 3.11.0a0 (heads/optimize-co-positions:760daf9858, Jul 2 2021, 19:08:05) [GCC 11.1.0]
== Linux-5.12.13-arch1-2-x86_64-with-glibc2.33 little-endian
== cwd: /home/pablogsal/github/python/main/build/test_python_15988æ
== CPU count: 36
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 2.15 Run tests sequentially
0:00:00 load avg: 2.15 [1/1] test_compile
test_stack_overflow (test.test_compile.TestSpecifics) ... ok
----------------------------------------------------------------------
Ran 1 test in 3.945s
OK
== Tests result: SUCCESS ==
1 test OK.
Total duration: 4.0 sec
Tests result: SUCCESS
./python -m test test_compile -m test_stack_overflow -v 3.77s user 0.47s system 99% cpu 4.241 total
@isidentical: Status check is done, and it's a success ❌ . |
concurrent_futures error, irrelevant, restarting the CI |
@isidentical: Status check is done, and it's a success ✅ . |
Sorry, I can't merge this PR. Reason: |
@isidentical: Status check is done, and it's a success ✅ . |
The new resizing system works like this;
So now we do considerably lower number of
_PyBytes_Resize
calls.https://bugs.python.org/issue43950
Automerge-Triggered-By: GH:isidentical