Skip to content

Remove DELETE_DEREF bytecode instruction #145858

Open

Description

@markshannon

Feature or enhancement

Proposal:

The DELETE_DEREF opcode can be removed and deletion implemented by the sequence:
LOAD_DEREF POP_TOP PUSH_NULL STORE_DEREF

This would free up an opcode, and, since deletion of non-locals variables is practically never used, there is no cost to doing this.

Has this already been discussed elsewhere?

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

Linked PRs

Activity

  1. added
    type-feature
    on Mar 12, 2026
  2. added
    performance
    interpreter-core
    on Mar 12, 2026
  3. akanil18 commented on Mar 13, 2026

    @akanil18

    Hi I would like to work on this issue. I can implement the removal of the DELETE_DEREF opcode and replace the deletion logic with the LOAD_DEREF POP_TOP PUSH_NULL STORE_DEREF sequence as proposed.

    Could you please assign this to me?

  4. sergey-miryanov commented on Mar 14, 2026

    @sergey-miryanov
    Contributor

    I would suggest you wait answer from Mark before start doing this.

  5. akanil18 commented on Mar 14, 2026

    @akanil18

    Okay sure .

  6. added a commit that references this issue on Apr 6, 2026
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-coreperformancetype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions