Skip to content
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
This repository was archived by the owner on Jul 29, 2026. It is now read-only.

optimize operations of store/load into dup/store #208

Description

@obriencj

For operations like

STORE_GLOBAL 5
LOAD_GLOBAL 5

there's some overhead in checking to load the name and dict lookup the value. There's less overhead in LOAD_FAST and LOAD_DEREF but it's still slightly slower than simply DUP the top of stack. We still want to write the value to the relevant location.

DUP_TOP
STORE_GLOBAL 5

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions