[issue45953] Statically allocate interpreter states as much as possible.

2022-03-29 Thread Julien Palard
Julien Palard added the comment: > Since you seem to be challenging the value of 9, my question to you > is, why do you care what the refcount of 1 is? Yesterday I was teaching Python, and we were speaking of integer immutability, names being "labels to objects" and so on, and I was

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: I used 9 in deepfreeze.py to signify "immortal object". It has been copied by others (small integers are essentially immortal too). I wasn't too sure that the refcount wouldn't go below zero if the interpreter is repeatedly finalized and

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Julien Palard
Julien Palard added the comment: Hum, and why 9? I am probably missing something obvious but 1 should be enough to ensure the value never hits 0. Except for refcount bugs obviously, but I don't think this is the right reason? -- ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: Please don’t try to “fix” anything. The value is only useful if you understand the implementation. It should map straightforwardly to what’s in memory. On Mon, Mar 28, 2022 at 05:16 STINNER Victor wrote: > > STINNER Victor added the comment: > > > Should

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread STINNER Victor
STINNER Victor added the comment: > Should sys.getrefcount try to "fix" the value (...) https://peps.python.org/pep-0683/ would make it possible. Right now, I don't think that it's possible. Right now, a refcount of 100210 can be a real value, or it can be an immortal object.

[issue45953] Statically allocate interpreter states as much as possible.

2022-03-28 Thread Julien Palard
Julien Palard added the comment: Since https://github.com/python/cpython/commit/121f1f893a39d0b58d3d2b5597505c154ecaac2a, `sys.getrefcount(1)` is surprising: >>> __import__("sys").getrefcount(1) 100210 Should sys.getrefcount try to "fix" the value like by returning

[issue45953] Statically allocate interpreter states as much as possible.

2022-02-01 Thread miss-islington
miss-islington added the comment: New changeset f78be59c83c151d94902daef56218530c52e29e7 by Eric Snow in branch 'main': bpo-45953: Preserve backward compatibility on some PyThreadState field names. (GH-31038) https://github.com/python/cpython/commit/f78be59c83c151d94902daef56218530c52e29e7

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-31 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +29221 pull_request: https://github.com/python/cpython/pull/31038 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-31 Thread Eric Snow
Eric Snow added the comment: > Any chance we could revert the recent renaming of tstate.exc_state and > tstate.root_cframe Yeah, I'll sort this out. Sorry for that. -- ___ Python tracker

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-28 Thread Brandt Bucher
Brandt Bucher added the comment: Any chance we could revert the recent renaming of tstate.exc_state and tstate.root_cframe in https://github.com/python/cpython/pull/30590? It broke Greenlet again: https://github.com/python-greenlet/greenlet/issues/288 If it's only a name change (and the

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread Eric Snow
Eric Snow added the comment: New changeset 322f962f3ee31d0dbde99e36379de8488ccc6804 by Eric Snow in branch 'main': bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589)

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread Eric Snow
Eric Snow added the comment: New changeset 324908ba936d5d262026deebb81f050803848c41 by Eric Snow in branch 'main': bpo-45953: Statically initialize all the PyThreadState fields we can. (gh-30590) https://github.com/python/cpython/commit/324908ba936d5d262026deebb81f050803848c41 --

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28788 pull_request: https://github.com/python/cpython/pull/30590 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28787 pull_request: https://github.com/python/cpython/pull/30589 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28786 pull_request: https://github.com/python/cpython/pull/30588 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-12 Thread Eric Snow
Eric Snow added the comment: New changeset ed57b36c32e521162dbb97199e64a340d3bff827 by Eric Snow in branch 'main': bpo-45953: Statically allocate the main interpreter (and initial thread state). (gh-29883) https://github.com/python/cpython/commit/ed57b36c32e521162dbb97199e64a340d3bff827

[issue45953] Statically allocate interpreter states as much as possible.

2022-01-11 Thread Eric Snow
Eric Snow added the comment: New changeset cf496d657a1a82eaf9ebfb47d721676fef6effa5 by Eric Snow in branch 'main': bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096) https://github.com/python/cpython/commit/cf496d657a1a82eaf9ebfb47d721676fef6effa5 --

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28319 pull_request: https://github.com/python/cpython/pull/30096 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-13 Thread Eric Snow
Eric Snow added the comment: New changeset 121f1f893a39d0b58d3d2b5597505c154ecaac2a by Eric Snow in branch 'main': bpo-45953: Statically initialize the small ints. (gh-30092) https://github.com/python/cpython/commit/121f1f893a39d0b58d3d2b5597505c154ecaac2a --

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-13 Thread Eric Snow
Change by Eric Snow : -- pull_requests: +28315 pull_request: https://github.com/python/cpython/pull/30092 ___ Python tracker ___

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +28109 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29883 ___ Python tracker

[issue45953] Statically allocate interpreter states as much as possible.

2021-12-01 Thread Eric Snow
New submission from Eric Snow : Currently we allocate each new PyInterpreterState in PyInterpreterState_New(). Furthermore, PyInterpreterState is full of pointers which are almost all allocated on the heap during runtime init. We can statically allocate (and initialize?) most of what goes