diff options
author | Mark Shannon <mark@hotpy.org> | 2023-06-22 08:48:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 08:48:19 (GMT) |
commit | 04492cbc9aa45ac2c12d22083c406a0364c39f5b (patch) | |
tree | 4eb26dc0dca29519cabe1086aec523bc29e8f4b5 /Misc | |
parent | c01da2896ab92ba7193bcd6ae56908c5c7277e75 (diff) | |
download | cpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.zip cpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.tar.gz cpython-04492cbc9aa45ac2c12d22083c406a0364c39f5b.tar.bz2 |
GH-91095: Specialize calls to normal Python classes. (GH-99331)
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2022-11-10-13-04-35.gh-issue-91095.4E3Pwn.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-11-10-13-04-35.gh-issue-91095.4E3Pwn.rst b/Misc/NEWS.d/next/Core and Builtins/2022-11-10-13-04-35.gh-issue-91095.4E3Pwn.rst new file mode 100644 index 0000000..5633097 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-11-10-13-04-35.gh-issue-91095.4E3Pwn.rst @@ -0,0 +1,11 @@ +Specializes calls to most Python classes. Specifically, any class that +inherits from ``object``, or another Python class, and does not override +``__new__``. + +The specialized instruction does the following: + +1. Creates the object (by calling ``object.__new__``) +2. Pushes a shim frame to the frame stack (to cleanup after ``__init__``) +3. Pushes the frame for ``__init__`` to the frame stack + +Speeds up the instantiation of most Python classes. |