[issue45522] Allow to build Python without freelists

2022-01-17 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue to not forget to complete the doc.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2022-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Freelists for object structs can now be disabled. A new configure option 
> --without-freelists can be used to disable all freelists except empty tuple 
> singleton. (Contributed by Christian Heimes in bpo-45522)

Can you please document the new configuration option in 
https://docs.python.org/dev/using/configure.html ?

When you write :option:`--without-freelists` in what's new in Python 3.11 to 
get a link ;-)

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-29 Thread Christian Heimes


Christian Heimes  added the comment:

Which part of the patch is causing you extra work? Would you be fine if I only 
remove the configure option and leave the fixes for zero-length freelists 
(#define PyList_MAXFREELIST 0) in?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-28 Thread Mark Shannon


Mark Shannon  added the comment:

I think we should revert this. It just makes working with freelists more 
cumbersome. Having more configure options just makes it more likely that we 
will fail to test some configuration.

If you want to disable freelists in your experiments, feel free to do so, but 
it doesn't need to be in main, IMO.

--
nosy: +Mark.Shannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-21 Thread Christian Heimes


Change by Christian Heimes :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-21 Thread miss-islington


miss-islington  added the comment:


New changeset 9942f42a93ccda047fd3558c47b822e99afe10c0 by Christian Heimes in 
branch 'main':
bpo-45522: Allow to disable freelists on build time (GH-29056)
https://github.com/python/cpython/commit/9942f42a93ccda047fd3558c47b822e99afe10c0


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-20 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +27352
pull_request: https://github.com/python/cpython/pull/29086

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-19 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +27327
pull_request: https://github.com/python/cpython/pull/29056

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45522] Allow to build Python without freelists

2021-10-19 Thread Christian Heimes


New submission from Christian Heimes :

Freelists are an optimization trick to avoid allocation and deallocation of 
commonly used structures. Currently Python has freelists for frame, tuple, 
float, list, dict, async generators, and context objects. Small ints are also 
cached.

For experimentation with alternative memory allocators such as mimalloc, I 
would like to introduce a way to disable freelists. Tuples's _Py_tuple_state 
struct has a conditional check on #if PyTuple_MAXSAVESIZE > 0. I propose to add 
same logic to all other structs.

--
assignee: christian.heimes
components: C API
messages: 404289
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Allow to build Python without freelists
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com