Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-45522: Allow to disable freelists on build time#29056
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
bpo-45522: Allow to disable freelists on build time #29056
Uh oh!
There was an error while loading. Please reload this page.
Conversation
tiran commented Oct 19, 2021 • edited by miss-islington
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by miss-islington
Uh oh!
There was an error while loading. Please reload this page.
tiran commented Oct 19, 2021
|
8770f42 to 754b256CompareFreelists for object structs can now be disabled. A new :program:`configure` option :option:`!--without-freelists` can be used to disable all freelists except empty tuple singleton. Signed-off-by: Christian Heimes <[email protected]>
754b256 to 2af07c2Comparetiran commented Oct 19, 2021
One unit test is failing when building Python |
vstinner commented Oct 19, 2021
What is your motivation for this change? Is it an experimental change? Freelists are important for Python performance. Shipping a Python without them doesn't seem useful. I disabled freelists in the past when working on subinterpreters. But I modified the code in the meanwhile to make them per-interpreter. |
corona10 commented Oct 19, 2021
tiran commented Oct 20, 2021
My motivations are listed in the ticket. tl;dr it's for alternative memory allocators like If you don't like the configure option, then I can split the PR up into the internal C code fixes and the public configure option. I definitely want to land the C code changes. They also fix various bugs when |
tiran commented Oct 20, 2021
PR GH-29086 is a minimal version of this PR without the configure flag. |
corona10 commented Oct 20, 2021
@tiran I prefer this version for our future experiment :) |
corona10 left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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 am okay with this PR for future experiments.
I believe that mimalloc will be adopted at least for improving performance.
see: Benchmark result which Trian and Neil digged at this sprint -> https://gist.github.com/pablogsal/8027937b71cd30f17aaaa5ef7c885d3e
Uh oh!
There was an error while loading. Please reload this page.
* main: (263 commits) bpo-45521: Fix a bug in the obmalloc radix tree code. (pythonGH-29051) bpo-45522: Allow to disable freelists on build time (pythonGH-29056) bpo-34451: Document prompt and output toggle feature in html tutorial (pythonGH-27105) bpo-44019: Add operator.call() to __all__ for the operator module (pythonGH-29110) bpo-45315: PyType_FromSpec: Copy spec->name and have the type own the memory for its name (pythonGH-29103) bpo-44220: Export PyStructSequence_UnnamedField in the limited API (pythonGH-26331) bpo-44174: [Enum] add reference to name mangling (pythonGH-29116) bpo-45548: add some missing entries to `Modules/Setup` (pythonGH-29115) bpo-35673: Add a public alias for namespace package __loader__ attribute (python#29049) bpo-45192: Fix a bug that infers the type of an os.PathLike[bytes] object as str (pythonGH-28323) bpo-45527: Don't count cache hits, just misses. (pythonGH-29092) bpo-45320: Remove long-deprecated inspect methods (pythonGH-28618) bpo-41374: Remove obsolete exclusion of netinet/tcp.h on Cygwin (pythonGH-21649) bpo-45532: Replace 'default' with 'main' as default in sys.version (pythonGH-29100) bpo-45464: [doc] Explain that subclassing multiple exceptions is fragile (pythonGH-29094) Cleanup a couple of comments left on PR 28775 post-merge. (pythonGH-29079) bpo-45536: Check OpenSSL APIs in configure (pythonGH-29088) Add PEPs 593 & 647 to list of PEPs at top of typing docs (pythonGH-29097) Add a comment about how to fix bogus test_host_resolution_bad_address failures (python#29085) bpo-44525: Specialize simple Python calls. (pythonGH-29033) ...
Freelists for object structs can now be disabled. A new
configureoption
--without-freelistscan be used to disable all freelistsexcept empty tuple singleton. Internal Py*_MAXFREELIST macros can now
be defined as 0 without causing compiler warnings and segfaults.
Signed-off-by: Christian Heimes [email protected]
https://bugs.python.org/issue45522
Automerge-Triggered-By: GH:tiran