https://github.com/python/cpython/commit/91569eb2398d494c71fd0abb48fe7e5f2cfed1ea
commit: 91569eb2398d494c71fd0abb48fe7e5f2cfed1ea
branch: main
author: Shamil <[email protected]>
committer: iritkatriel <[email protected]>
date: 2026-11-14T07:34:11Z
summary:

gh-160247: Reduce padding in _PyInstructionSequence (#160271)

files:
A 
Misc/NEWS.d/next/Core_and_Builtins/2026-10-22-20-18-44.gh-issue-160247.WC8hRU.rst
M Include/internal/pycore_instruction_sequence.h

diff --git a/Include/internal/pycore_instruction_sequence.h 
b/Include/internal/pycore_instruction_sequence.h
index 6257b771fd9539..1643776c47ee69 100644
--- a/Include/internal/pycore_instruction_sequence.h
+++ b/Include/internal/pycore_instruction_sequence.h
@@ -40,8 +40,8 @@ typedef struct instruction_sequence {
     /* Map of a label id to instruction offset (index into s_instrs).
      * If s_labelmap is NULL, then each label id is the offset itself.
      */
-    int *s_labelmap;
     int s_labelmap_size;
+    int *s_labelmap;
 
     /* PyList of instruction sequences of nested functions */
     PyObject *s_nested;
diff --git 
a/Misc/NEWS.d/next/Core_and_Builtins/2026-10-22-20-18-44.gh-issue-160247.WC8hRU.rst
 
b/Misc/NEWS.d/next/Core_and_Builtins/2026-10-22-20-18-44.gh-issue-160247.WC8hRU.rst
new file mode 100644
index 00000000000000..97755e25aac7c2
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Core_and_Builtins/2026-10-22-20-18-44.gh-issue-160247.WC8hRU.rst
@@ -0,0 +1,2 @@
+Reduce padding in the internal instruction sequence structure, saving 8 bytes
+per instance on 64-bit platforms. Patch by Shamil Abdulaev.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to