Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove irregular stack effects #105678

Closed
Closed
Labels
performancePerformance or resource usage
@markshannon

Description

@markshannon

As we move towards generating more components from the instruction definition file (bytecodes.c), it helps if the instructions have regular formats and stack effects.
Currently the stack effects can be simple, variable, conditional or complex.

  • Simple: Does not depend on the operand (oparg)
  • Variable: Either pops or pushesoparg * k items.
  • Conditional: Pushes a value conditional onoparg & 1
  • Complex: The stack effect depends on a set of flags embedded inoparg.

We can easily get rid of the complex case. There are only two cases,MAKE_FUNCTION andFORMAT_VALUE. Both can easily broken down into simple (and faster) parts.

We might want to get rid of condition stack effects, as it would simplify things, but performance may suffer as bothLOAD_GLOBAL andLOAD_ATTR are conditional and they are performance critical.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp