[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-06 Thread STINNER Victor


STINNER Victor  added the comment:

My commit ea251806b8d11b30d2182af1e589caf88acf (interned strings) 
introduced bpo-46006 "[subinterpreter] _PyUnicode_EqualToASCIIId() issue with 
subinterpreters" regression.

To unblock the Python 3.11.0a4 release, I just reverted the change. It 
reintroduces the issue, so I created bpo-46283: "[subinterpreters] Unicode 
interned strings must not be shared between interpreters".

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-06 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 72c260cf0c71eb01eb13100b751e9d5007d00b70 by Victor Stinner in 
branch '3.10':
[3.10] bpo-46006: Revert "bpo-40521: Per-interpreter interned strings 
(GH-20085)" (GH-30422) (GH-30425)
https://github.com/python/cpython/commit/72c260cf0c71eb01eb13100b751e9d5007d00b70


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28640
pull_request: https://github.com/python/cpython/pull/30433

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-06 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28631
pull_request: https://github.com/python/cpython/pull/30425

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 35d6540c904ef07b8602ff014e520603f84b5886 by Victor Stinner in 
branch 'main':
bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" 
(GH-30422)
https://github.com/python/cpython/commit/35d6540c904ef07b8602ff014e520603f84b5886


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2022-01-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28626
pull_request: https://github.com/python/cpython/pull/30422

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-06-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

[Victor Stinner]
> My plan is to merge changes which have no significant
> impact on performances

FWIW, PyFloat_FromDouble() is the most performance critical function in 
floatobject.c.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-05-17 Thread STINNER Victor


STINNER Victor  added the comment:

> I reopen the issue to remind me that collections.deque() freelist is shared 
> by all interpreters.

Each deque instance now has its own free list.

But dtoa.c still has a per-process cache, shared by all interpreters.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-05-04 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +24574
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25906

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-25 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue to remind me that collections.deque() freelist is shared by 
all interpreters.

--
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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 3bb19873abd572879cc9a8810b1db9db1f704070 by Raymond Hettinger in 
branch 'master':
Revert "bpo-40521: Remove freelist from collections.deque() (GH-21073)" 
(GH-24944)
https://github.com/python/cpython/commit/3bb19873abd572879cc9a8810b1db9db1f704070


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 39f643614d03748a5fad462fe7ed26a174a522fa by Victor Stinner in 
branch 'master':
Revert "bpo-40521: Make dtoa bigint free list per-interpreter (GH-24821)" 
(GH-24964)
https://github.com/python/cpython/commit/39f643614d03748a5fad462fe7ed26a174a522fa


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +23723
pull_request: https://github.com/python/cpython/pull/24964

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-22 Thread STINNER Victor


STINNER Victor  added the comment:

Mark Dickinson: "I just noticed the change to dtoa.c in GH-24821. Please could 
you explain what the benefit of this change was?"

The rationale is explained in bpo-40512. The goal is to run multiple Python 
interpreters in parallel in the same process.

dtoa.c had global variables shared by all interpreters without locking, so two 
intepreters could corrupt the freelist consistency.


Mark Dickinson: "In general, we need to be very conservative with changes to 
dtoa.c: it's a complex, fragile, performance-critical piece of code, and 
ideally we'd like it not to diverge from the upstream code any more than it 
already has, in case we need to integrate bugfixes from upstream."

I know that dtoa.c was copied from a third party project. But the commit 
5bd1059184b154d339f1bd53d23c98b5bcf14c8c change change only makes sense in 
Python, I don't think that it would make sense to propose it upstream.

dtoa.c _Py_dg_strtod() is called by:

* float.__round__()
* _PyOS_ascii_strtod()

_PyOS_ascii_strtod() is called PyOS_string_to_double() which is called by:

* float_from_string_inner()
* complex_from_string_inner()
* pickle load_float()
* parser parsenumber_raw()
* marshal r_float_str

dtoa.c _Py_dg_dtoa() is called by:

* float.__round__()
* PyOS_double_to_string()

PyOS_double_to_string() is called by:

* float_repr()
* complex_repr()
* bytes % float: _PyBytes_FormatEx()
* str % float: PyUnicode_Format()
* _PyLong_FormatAdvancedWriter()
* _PyComplex_FormatAdvancedWriter()
* pickle save_float()
* marshal w_float_str


I guess that the most important use case are float(str) and str(float). I wrote 
attached bench_dtoa.py to measure the effect on performance of the commit 
5bd1059184b154d339f1bd53d23c98b5bcf14c8c:
---
$ python3 -m pyperf compare_to before.json after.json 
float('0'): Mean +- std dev: [before] 80.5 ns +- 3.1 ns -> [after] 90.1 ns +- 
3.6 ns: 1.12x slower
float('1.0'): Mean +- std dev: [before] 89.5 ns +- 4.3 ns -> [after] 97.2 ns +- 
2.6 ns: 1.09x slower
float('340282366920938463463374607431768211455'): Mean +- std dev: [before] 480 
ns +- 42 ns -> [after] 514 ns +- 13 ns: 1.07x slower
float('104431413152506691752710716624382579964249047383780384233483283953907971557456848826811934997558340890106714439262837987573438185793607263236087851365277945956976543709998340361590134383718314428070011855946226376318839397712745672334684344586617496807908705803704071284048740118609114467977783598029006686938976881787785946905630190260940599579453432823469303026696443059025015972399867714215541693835559885291486318237914434496734087811872639496475100189041349008417061675093668333850551032972088269550769983616369411933015213796825837188091833656751221318492846368125550225998300412344784862595674492194617023806505913245610825731835380087608622102834270197698202313169017678006675195485079921636419370285375124784014907159135459982790513399611551794271106831134090584272884279791554849782954323534517065223269061394905987693002122963395687782878948440616007412945674919823050571642377154816321380631045902916136926708342856440730447899971901781465763473223850267253059899795996090799
 
469201774624817718449867455659250178329070473119433165550807568221846571746373296884912819520317457002440926616910874148385078411929804522981857338977648103126085903001302413467189726673216491511131602920781738033436090243804708340403154190335'):
 Mean +- std dev: [before] 717 ns +- 36 ns -> [after] 990 ns +- 27 ns: 1.38x 
slower
str(0.0): Mean +- std dev: [before] 113 ns +- 8 ns -> [after] 106 ns +- 4 ns: 
1.06x faster
str(1.0): Mean +- std dev: [before] 141 ns +- 11 ns -> [after] 135 ns +- 17 ns: 
1.05x faster
str(inf): Mean +- std dev: [before] 110 ns +- 11 ns -> [after] 98.9 ns +- 3.3 
ns: 1.12x faster

Benchmark hidden because not significant (1): str(3.402823669209385e+38)

Geometric mean: 1.05x slower
---

I built Python with "./configure --enable-optimizations --with-lto" on Fedora 
33 (GCC 10.2.1). I didn't use CPU isolation.

Oh, float(str) is between 1.09x slower and 1.38x slower.

On the other side, str(float) is between 1.06x and 1.12x faster, I'm not sure 
why. I guess that the problem is that PGO+LTO build is not reproducible, GCC 
might prefer to optimize some functions or others depending on the PROFILE_TASK 
(Makefile.pre.in, command used by GCC profiler).


Mark Dickinson: "It's feeling as though the normal Python development process 
is being bypassed here. As I understand it, this and similar changes are in aid 
of per-subinterpreter GILs. Has there been agreement from the core devs or 
steering council that this is a desirable goal? Should there be a PEP before 
more changes like this are made? (Or maybe there's already a PEP, that I 
missed? I know about PEP 554, but that PEP is explicit that GIL sharing is out 
of scope.)"


Honestly, I didn't expect any significant impact on performance on the change. 
So I merged the PR as I merge other fixes for subinterpreters. It seems 

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-21 Thread Mark Dickinson


Mark Dickinson  added the comment:

Hi Victor,

I just noticed the change to dtoa.c in GH-24821. Please could you explain what 
the benefit of this change was?

In general, we need to be very conservative with changes to dtoa.c: it's a 
complex, fragile, performance-critical piece of code, and ideally we'd like it 
not to diverge from the upstream code any more than it already has, in case we 
need to integrate bugfixes from upstream.

It's feeling as though the normal Python development process is being bypassed 
here. As I understand it, this and similar changes are in aid of 
per-subinterpreter GILs. Has there been agreement from the core devs or 
steering council that this is a desirable goal? Should there be a PEP before 
more changes like this are made? (Or maybe there's already a PEP, that I 
missed? I know about PEP 554, but that PEP is explicit that GIL sharing is out 
of scope.)

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +23703
pull_request: https://github.com/python/cpython/pull/24944

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-17 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5bd1059184b154d339f1bd53d23c98b5bcf14c8c by junyixie in branch 
'master':
bpo-40521: Make dtoa bigint free list per-interpreter (GH-24821)
https://github.com/python/cpython/commit/5bd1059184b154d339f1bd53d23c98b5bcf14c8c


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-11 Thread junyixie


junyixie  added the comment:

https://github.com/python/cpython/pull/24821/commits/9d7681dbd273b5025fd9b19d1be0a1f978a0b12e

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-11 Thread junyixie


junyixie  added the comment:

Should Make dtoa bigint free list per-interpreter.

static Bigint *bigint_freelist[Kmax+1]; -> _is { Bigint 
*bigint_freelist[Kmax+1]; }

--
message_count: 43.0 -> 44.0
nosy: +JunyiXie
nosy_count: 5.0 -> 6.0
pull_requests: +23587
pull_request: https://github.com/python/cpython/pull/24821

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-01-29 Thread STINNER Victor


STINNER Victor  added the comment:

> I reopen the issue. This change caused a regression in attached 
> interned_bug.py.

Fixed by:

commit c8a87addb1fa35dec79ed8f227eba3694fc36234
Author: Mohamed Koubaa 
Date:   Mon Jan 4 08:34:26 2021 -0600

bpo-1635741: Port pyexpat to multi-phase init (PEP 489) (GH-2)

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

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-26 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset ea251806b8d11b30d2182af1e589caf88acf by Victor Stinner in 
> branch 'master':
> bpo-40521: Per-interpreter interned strings (GH-20085)

I reopen the issue. This change caused a regression in attached 
interned_bug.py. Output:
---
$ ./python interned_bug.py 
Exception ignored deletion of interned string failed:
KeyError: 'out of memory'
python: Objects/unicodeobject.c:1946: unicode_dealloc: Assertion 
`Py_REFCNT(unicode) == 1' failed.
Abandon (core dumped)
---

Running "import xml.parsers.expat" in a subinterpreter causes two issues when 
the subinterpreter completes:

* pyexpat.errors and pyexpat.model dictionaries are cleared: all values set to 
None
* unicode_dealloc() logs an error on an interned string in the subinterpreter, 
because the string doesn't exist in the subinterpreter interned dictionary.

The interned string is created in the main interpreter and so stored in the 
main interpreter interned dictionary.

The string is stored in 2 dictionaries of pyexpat.errors dictionaries:

>>> pyexpat.errors.messages[1]
'out of memory'
>>> pyexpat.errors.codes['out of memory']
1

When the subinterpreter clears pyexpat.errors and pyexpat.model dictionaries, 
the interned string is deleted: unicode_dealloc() is called. But 
unicode_dealloc() fails to delete the interned string in the subinterpreter 
interned dictionary.

pyexpat.errors and pyexpat.model modules are cleared because they are stored as 
different names in sys.modules by Lib/xml/parsers/expat.py:

sys.modules['xml.parsers.expat.model'] = model
sys.modules['xml.parsers.expat.errors'] = errors

--
resolution: fixed -> 
status: closed -> open
Added file: https://bugs.python.org/file49699/interned_bug.py

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-25 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-40521: Per-interpreter interned strings (GH-20085)

That one wasn't easy, but it's now done! I close the issue.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.9

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-12-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ea251806b8d11b30d2182af1e589caf88acf by Victor Stinner in 
branch 'master':
bpo-40521: Per-interpreter interned strings (GH-20085)
https://github.com/python/cpython/commit/ea251806b8d11b30d2182af1e589caf88acf


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-09-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7f413a5d95e6d7d6e2c9844c33594d6288f4 by Victor Stinner in 
branch 'master':
bpo-40521: Fix PyUnicode_InternInPlace() (GH-22376)
https://github.com/python/cpython/commit/7f413a5d95e6d7d6e2c9844c33594d6288f4


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-09-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +21415
pull_request: https://github.com/python/cpython/pull/22376

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-07-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 90db4653ae37ef90754cfd2cd6ec6857b87a88e6 by Victor Stinner in 
branch 'master':
bpo-40521: Cleanup finalize_interp_types() (GH-21265)
https://github.com/python/cpython/commit/90db4653ae37ef90754cfd2cd6ec6857b87a88e6


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-07-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20413
pull_request: https://github.com/python/cpython/pull/21265

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1 by Victor Stinner in 
branch 'master':
bpo-40521: Optimize PyBytes_FromStringAndSize(str, 0) (GH-21142)
https://github.com/python/cpython/commit/91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20301
pull_request: https://github.com/python/cpython/pull/21142

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0430dfac629b4eb0e899a09b899a494aa92145f6 by Victor Stinner in 
branch 'master':
bpo-40521: Always create the empty tuple singleton (GH-21116)
https://github.com/python/cpython/commit/0430dfac629b4eb0e899a09b899a494aa92145f6


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-24 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20279
pull_request: https://github.com/python/cpython/pull/21116

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cde283d16d87024f455e45c6f1b4e4f7d8905836 by Victor Stinner in 
branch 'master':
bpo-40521: Fix _PyContext_Fini() (GH-21103)
https://github.com/python/cpython/commit/cde283d16d87024f455e45c6f1b4e4f7d8905836


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20271
pull_request: https://github.com/python/cpython/pull/21103

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2f9ada96e0d420fed0d09a032b37197f08ef167a by Victor Stinner in 
branch 'master':
bpo-40521: Make Unicode latin1 singletons per interpreter (GH-21101)
https://github.com/python/cpython/commit/2f9ada96e0d420fed0d09a032b37197f08ef167a


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20270
pull_request: https://github.com/python/cpython/pull/21101

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 90ed8a6d71b2d6e0853c14e8e6f85fe730a4329a by Victor Stinner in 
branch 'master':
bpo-40521: Optimize PyUnicode_New(0, maxchar) (GH-21099)
https://github.com/python/cpython/commit/90ed8a6d71b2d6e0853c14e8e6f85fe730a4329a


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20268
pull_request: https://github.com/python/cpython/pull/21099

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f363d0a6e9cfa50677a6de203735fbc0d06c2f49 by Victor Stinner in 
branch 'master':
bpo-40521: Make empty Unicode string per interpreter (GH-21096)
https://github.com/python/cpython/commit/f363d0a6e9cfa50677a6de203735fbc0d06c2f49


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20263
pull_request: https://github.com/python/cpython/pull/21096

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 281cce1106568ef9fec17e3c72d289416fac02a5 by Victor Stinner in 
branch 'master':
bpo-40521: Make MemoryError free list per interpreter (GH-21086)
https://github.com/python/cpython/commit/281cce1106568ef9fec17e3c72d289416fac02a5


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f9bd05e83e32bece49de5af0c9a232325c57648a by Raymond Hettinger in 
branch 'master':
bpo-40521: Empty frozenset is no longer a singleton (GH-21085)
https://github.com/python/cpython/commit/f9bd05e83e32bece49de5af0c9a232325c57648a


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20252
pull_request: https://github.com/python/cpython/pull/21086

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +20251
pull_request: https://github.com/python/cpython/pull/21085

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 522691c46e2ae51faaad5bbbce7d959dd61770df by Victor Stinner in 
branch 'master':
bpo-40521: Cleanup code of free lists (GH-21082)
https://github.com/python/cpython/commit/522691c46e2ae51faaad5bbbce7d959dd61770df


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20248
pull_request: https://github.com/python/cpython/pull/21082

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c41eed1a874e2f22bde45c3c89418414b7a37f46 by Victor Stinner in 
branch 'master':
bpo-40521: Make bytes singletons per interpreter (GH-21074)
https://github.com/python/cpython/commit/c41eed1a874e2f22bde45c3c89418414b7a37f46


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 32f2eda85957365d208f499b730d30b7eb419741 by Raymond Hettinger in 
branch 'master':
bpo-40521: Remove freelist from collections.deque() (GH-21073)
https://github.com/python/cpython/commit/32f2eda85957365d208f499b730d30b7eb419741


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20242
pull_request: https://github.com/python/cpython/pull/21074

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +rhettinger
nosy_count: 4.0 -> 5.0
pull_requests: +20241
pull_request: https://github.com/python/cpython/pull/21073

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 261cfedf7657a515e04428bba58eba2a9bb88208 by Victor Stinner in 
branch 'master':
bpo-40521: Make the empty frozenset per interpreter (GH-21068)
https://github.com/python/cpython/commit/261cfedf7657a515e04428bba58eba2a9bb88208


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20237
pull_request: https://github.com/python/cpython/pull/21068

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:

All free lists are now per-interpreter! See Modules/gcmodule.c:

static void
clear_freelists(PyThreadState *tstate)
{
_PyFrame_ClearFreeList(tstate);
_PyTuple_ClearFreeList(tstate);
_PyFloat_ClearFreeList(tstate);
_PyList_ClearFreeList(tstate);
_PyDict_ClearFreeList(tstate);
_PyAsyncGen_ClearFreeLists(tstate);
_PyContext_ClearFreeList(tstate);
}

I'm still working on the Unicode caches.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b4e85cadfbc2b1b24ec5f3159e351dbacedaa5e0 by Victor Stinner in 
branch 'master':
bpo-40521: Make dict free lists per-interpreter (GH-20645)
https://github.com/python/cpython/commit/b4e85cadfbc2b1b24ec5f3159e351dbacedaa5e0


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-08 Thread Mark Shannon


Mark Shannon  added the comment:

I'd be interested to see if you can get more consistent results.

Performance of modern hardware is very sensitive to memory layout, so some sort 
of address randomization might be needed to remove artifacts of layout.
It is possible that the objects on the free lists for telco are better aligned 
with cache lines, or fit is cache better in some way.
And conversely, in chameleon, objects fit cache in a worse way.
Just a guess, of course.

Thanks for trying to get some benchmark results.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-07 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40887: "Free lists are still used after being finalized (cleared)".

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-06 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

pyperformance comparaison between:

* commit dc24b8a2ac32114313bae519db3ccc21fe45c982 (before "Make tuple free list 
per-interpreter" change)
* PR 20645 (dict free lists) which cumulates all free lists changes (already 
commited + the PR)

Extract of the tested patch, new PyInterpreterState members:

diff --git a/Include/internal/pycore_interp.h b/Include/internal/pycore_interp.h
index f04ea330d0..b1a25e0ed4 100644
--- a/Include/internal/pycore_interp.h
+++ b/Include/internal/pycore_interp.h
(...)
@@ -157,6 +233,18 @@ struct _is {
 */
 PyLongObject* small_ints[_PY_NSMALLNEGINTS + _PY_NSMALLPOSINTS];
 #endif
+struct _Py_unicode_state unicode;
+struct _Py_float_state float_state;
+/* Using a cache is very effective since typically only a single slice is
+   created and then deleted again. */
+PySliceObject *slice_cache;
+
+struct _Py_tuple_state tuple;
+struct _Py_list_state list;
+struct _Py_dict_state dict_state;
+struct _Py_frame_state frame;
+struct _Py_async_gen_state async_gen;
+struct _Py_context_state context;
 };


Results:

$ python3 -m pyperf compare_to 2020-06-04_20-10-master-dc24b8a2ac32.json.gz 
2020-06-04_20-10-master-dc24b8a2ac32-patch-free_lists.json.gz -G 
Slower (10):
- chameleon: 20.1 ms +- 0.4 ms -> 23.1 ms +- 4.0 ms: 1.15x slower (+15%)
- logging_silent: 334 ns +- 51 ns -> 371 ns +- 70 ns: 1.11x slower (+11%)
- spectral_norm: 274 ms +- 37 ms -> 302 ms +- 55 ms: 1.10x slower (+10%)
- logging_format: 22.5 us +- 0.4 us -> 24.5 us +- 2.7 us: 1.09x slower (+9%)
- json_dumps: 26.6 ms +- 4.0 ms -> 28.7 ms +- 5.5 ms: 1.08x slower (+8%)
- sympy_sum: 390 ms +- 3 ms -> 415 ms +- 45 ms: 1.06x slower (+6%)
- float: 217 ms +- 3 ms -> 231 ms +- 30 ms: 1.06x slower (+6%)
- pidigits: 306 ms +- 32 ms -> 323 ms +- 47 ms: 1.06x slower (+6%)
- python_startup_no_site: 8.71 ms +- 0.77 ms -> 8.94 ms +- 0.91 ms: 1.03x 
slower (+3%)
- xml_etree_process: 130 ms +- 1 ms -> 133 ms +- 2 ms: 1.02x slower (+2%)

Faster (9):
- pickle_pure_python: 1.05 ms +- 0.16 ms -> 964 us +- 19 us: 1.09x faster (-9%)
- scimark_sparse_mat_mult: 11.4 ms +- 2.1 ms -> 10.5 ms +- 1.7 ms: 1.09x faster 
(-8%)
- hexiom: 19.5 ms +- 4.1 ms -> 18.0 ms +- 3.0 ms: 1.08x faster (-7%)
- telco: 15.7 ms +- 3.1 ms -> 14.5 ms +- 0.4 ms: 1.08x faster (-7%)
- unpickle: 31.8 us +- 5.7 us -> 29.5 us +- 4.9 us: 1.08x faster (-7%)
- scimark_lu: 292 ms +- 60 ms -> 274 ms +- 34 ms: 1.07x faster (-6%)
- django_template: 123 ms +- 16 ms -> 119 ms +- 2 ms: 1.04x faster (-3%)
- xml_etree_generate: 160 ms +- 4 ms -> 156 ms +- 3 ms: 1.02x faster (-2%)
- xml_etree_iterparse: 178 ms +- 3 ms -> 177 ms +- 2 ms: 1.01x faster (-1%)

Benchmark hidden because not significant (41): (...)


If we ignore differences smaller than 5%:

$ python3 -m pyperf compare_to 2020-06-04_20-10-master-dc24b8a2ac32.json.gz 
2020-06-04_20-10-master-dc24b8a2ac32-patch-free_lists.json.gz -G --min-speed=5
Slower (8):
- chameleon: 20.1 ms +- 0.4 ms -> 23.1 ms +- 4.0 ms: 1.15x slower (+15%)
- logging_silent: 334 ns +- 51 ns -> 371 ns +- 70 ns: 1.11x slower (+11%)
- spectral_norm: 274 ms +- 37 ms -> 302 ms +- 55 ms: 1.10x slower (+10%)
- logging_format: 22.5 us +- 0.4 us -> 24.5 us +- 2.7 us: 1.09x slower (+9%)
- json_dumps: 26.6 ms +- 4.0 ms -> 28.7 ms +- 5.5 ms: 1.08x slower (+8%)
- sympy_sum: 390 ms +- 3 ms -> 415 ms +- 45 ms: 1.06x slower (+6%)
- float: 217 ms +- 3 ms -> 231 ms +- 30 ms: 1.06x slower (+6%)
- pidigits: 306 ms +- 32 ms -> 323 ms +- 47 ms: 1.06x slower (+6%)

Faster (6):
- pickle_pure_python: 1.05 ms +- 0.16 ms -> 964 us +- 19 us: 1.09x faster (-9%)
- scimark_sparse_mat_mult: 11.4 ms +- 2.1 ms -> 10.5 ms +- 1.7 ms: 1.09x faster 
(-8%)
- hexiom: 19.5 ms +- 4.1 ms -> 18.0 ms +- 3.0 ms: 1.08x faster (-7%)
- telco: 15.7 ms +- 3.1 ms -> 14.5 ms +- 0.4 ms: 1.08x faster (-7%)
- unpickle: 31.8 us +- 5.7 us -> 29.5 us +- 4.9 us: 1.08x faster (-7%)
- scimark_lu: 292 ms +- 60 ms -> 274 ms +- 34 ms: 1.07x faster (-6%)

Benchmark hidden because not significant (46): (...)


Honestly, I'm surprised by these results. I don't see how these free lists 
change can make between 6 and 9 benchamrks faster (ex: 1.08x faster for 
telco!?). For me, it sounds like speed.python.org runner has some troubles. You 
can notice it if you look at the 3 last runs at https://speed.python.org/ : 
they are some spikes (in both directions, faster or slower) which are very 
surprising.

Pablo recently upgrade Ubuntu on the benchmark runner server. I don't know if 
it's related.

I plan to recompute all benchmarks run on the benchmark runner server since 
over the last years, pyperf and pyperformance were upgraded multiple times (old 
data were computed with old versions) and the system (Ubuntu) was upgraded 
(again, old data were computed with older Ubiuntu packages).

--


[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Have you done any performance analysis or tests of the cumulative effect of 
> all these changes?

No. It would be interesting to measure that using pyperformance.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-05 Thread Mark Shannon


Mark Shannon  added the comment:

I'm worried about the performance impact of these changes, especially as many 
of the changes haven't been reviewed.

Have you done any performance analysis or tests of the cumulative effect of all 
these changes?

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

bench_dict.patch: Microbenchmark on the C function PyDict_New() to measure the 
overhead of PR 20645.

--
Added file: https://bugs.python.org/file49216/bench_dict.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-05 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-40521: Make list free list per-interpreter (GH-20642)
> https://github.com/python/cpython/commit/88ec9190105c9b03f49aaef601ce02b242a75273

This change contains an interesting fix:

* _PyGC_Fini() clears gcstate->garbage list which can be stored in
  the list free list. Call _PyGC_Fini() before _PyList_Fini() to
  prevent leaking this list.

Maybe "Fini" functions should disable free lists to prevent following code to 
add something to a free list, during Python finalization.

--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19865
pull_request: https://github.com/python/cpython/pull/20645

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e005ead49b1ee2b1507ceea94e6f89c28ecf1f81 by Victor Stinner in 
branch 'master':
bpo-40521: Make context free list per-interpreter (GH-20644)
https://github.com/python/cpython/commit/e005ead49b1ee2b1507ceea94e6f89c28ecf1f81


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19864
pull_request: https://github.com/python/cpython/pull/20644

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 78a02c2568714562e23e885b6dc5730601f35226 by Victor Stinner in 
branch 'master':
bpo-40521: Make async gen free lists per-interpreter (GH-20643)
https://github.com/python/cpython/commit/78a02c2568714562e23e885b6dc5730601f35226


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19863
pull_request: https://github.com/python/cpython/pull/20643

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 88ec9190105c9b03f49aaef601ce02b242a75273 by Victor Stinner in 
branch 'master':
bpo-40521: Make list free list per-interpreter (GH-20642)
https://github.com/python/cpython/commit/88ec9190105c9b03f49aaef601ce02b242a75273


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19862
pull_request: https://github.com/python/cpython/pull/20642

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 3744ed2c9c0b3905947602fc375de49533790cb9 by Victor Stinner in 
branch 'master':
bpo-40521: Make frame free list per-interpreter (GH-20638)
https://github.com/python/cpython/commit/3744ed2c9c0b3905947602fc375de49533790cb9


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19858
pull_request: https://github.com/python/cpython/pull/20638

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7daba6f221e713f7f60c613b246459b07d179f91 by Victor Stinner in 
branch 'master':
bpo-40521: Make slice cache per-interpreter (GH-20637)
https://github.com/python/cpython/commit/7daba6f221e713f7f60c613b246459b07d179f91


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2ba59370c3dda2ac229c14510e53a05074b133d1 by Victor Stinner in 
branch 'master':
bpo-40521: Make float free list per-interpreter (GH-20636)
https://github.com/python/cpython/commit/2ba59370c3dda2ac229c14510e53a05074b133d1


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19857
pull_request: https://github.com/python/cpython/pull/20637

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19856
pull_request: https://github.com/python/cpython/pull/20636

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-04 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 69ac6e58fd98de339c013fe64cd1cf763e4f9bca by Victor Stinner in 
branch 'master':
bpo-40521: Make tuple free list per-interpreter (GH-20247)
https://github.com/python/cpython/commit/69ac6e58fd98de339c013fe64cd1cf763e4f9bca


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file49211/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49212/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file49210/microbench_tuple.py

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49213/microbench_tuple.py

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file49211/bench_tuple.patch

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-06-02 Thread STINNER Victor


STINNER Victor  added the comment:

Microbenchmark for tuple free list to measure PR 20247 overhead: 
microbench_tuple.py. It requires to apply bench_tuple.patch.

--
Added file: https://bugs.python.org/file49210/microbench_tuple.py

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0509c4547fc95cc32a91ac446a26192c3bfdf157 by Victor Stinner in 
branch 'master':
bpo-40521: Fix update_slot() when INTERN_NAME_STRINGS is not defined (#20246)
https://github.com/python/cpython/commit/0509c4547fc95cc32a91ac446a26192c3bfdf157


--

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19535
pull_request: https://github.com/python/cpython/pull/20247

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-19 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +19534
pull_request: https://github.com/python/cpython/pull/20246

___
Python tracker 

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



[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2020-05-14 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Subinterpreters -Interpreter Core
title: Make tuple, dict, frame free lists, unicode interned strings, unicode 
latin1 singletons per-interpreter -> [subinterpreters] Make free lists and 
unicode caches per-interpreter

___
Python tracker 

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