Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@isidentical
Copy link
Member

@isidenticalisidentical commentedJul 2, 2021
edited by miss-islington
Loading

The new resizing system works like this;

$ cat t.pya + a + a + b + c + a + a + a + b + c + a + a + a + b + c + a + a + a + b + c[repeated 99 more times]$ ./python t.pyRESIZE: prev len = 32, new len = 66FINAL SIZE: 56-----------------------------------------------------RESIZE: prev len = 32, new len = 66RESIZE: prev len = 66, new len = 134RESIZE: prev len = 134, new len = 270RESIZE: prev len = 270, new len = 542RESIZE: prev len = 542, new len = 1086RESIZE: prev len = 1086, new len = 2174RESIZE: prev len = 2174, new len = 4350RESIZE: prev len = 4350, new len = 8702FINAL SIZE: 8004

So now we do considerably lower number of_PyBytes_Resize calls.

https://bugs.python.org/issue43950

Automerge-Triggered-By: GH:isidentical

Copy link
Member

@pablogsalpablogsal left a 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-80:00:00 load avg: 2.15 Run tests sequentially0:00:00 load avg: 2.15 [1/1] test_compiletest_stack_overflow (test.test_compile.TestSpecifics) ... ok----------------------------------------------------------------------Ran 1 test in 3.945sOK== Tests result: SUCCESS ==1 test OK.Total duration: 4.0 secTests result: SUCCESS./python -m test test_compile -m test_stack_overflow -v  3.77s user 0.47s system 99% cpu 4.241 total

@miss-islington
Copy link
Contributor

@isidentical: Status check is done, and it's a success ❌ .

@isidentical
Copy link
MemberAuthor

concurrent_futures error, irrelevant, restarting the CI

@miss-islington
Copy link
Contributor

@isidentical: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Contributor

Sorry, I can't merge this PR. Reason:3 of 5 required status checks have not succeeded: 2 expected..

@miss-islington
Copy link
Contributor

@isidentical: Status check is done, and it's a success ✅ .

@miss-islingtonmiss-islington merged commitec8759b intopython:mainJul 2, 2021
@isidenticalisidentical changed the titlebpo-43950: optimize column table assembling with pre-sizing objectbpo-43950: optimize column table assembling with pre-sizing the column tableJul 3, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@pablogsalpablogsalpablogsal approved these changes

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@isidentical@miss-islington@pablogsal@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp