GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reduce padding in the instruction sequence structure · Issue #160247 · python/cpython

Reduce padding in the instruction sequence structure #160247

New issue
Copy link
New issue
Copy link
Open
#160271
Open
Reduce padding in the instruction sequence structure#160247
#160271
Copy link
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@ashm-dev
ashm-dev
opened on Oct 22, 2026
Issue body actions

Feature or enhancement

On an x86-64 GCC build, struct instruction_sequence in Include/internal/pycore_instruction_sequence.h occupies 72 bytes.

The following fields introduce two 4-byte alignment gaps: one before s_labelmap and another after s_labelmap_size.

int s_next_free_label;
int *s_labelmap;
int s_labelmap_size;
PyObject *s_nested;

Moving s_labelmap_size immediately before s_labelmap removes both gaps and reduces the structure to 64 bytes.

This would be an internal layout-only change, with no field type or compiler logic changes. The size reduction was verified with a standalone GCC layout check.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

  • gh-160247: Reduce padding in _PyInstructionSequence #160271

Activity

  1. ashm-dev
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Oct 22, 2026
  2. NekoAsakura
    added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Oct 22, 2026
  3. ashm-dev
    added a commit that references this issue on Oct 22, 2026

    Merge branch 'main' into pythongh-160247

    94f111d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.