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

PyCode_GetCode could be faster #93382

Closed
Labels
3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usage
@Fidget-Spinner

Description

@Fidget-Spinner

This potentially affects tools like coverage.py. It also means anything usingco_code in CPython frequently is significantly slower. Note that pre-3.11, most code would assume this operation is O(1), so it's probably called more often than we expect.

We should lazily initialise a hidden_co_code field and cache it there. Currently it creates a fresh bytes object on eachco_code access. This is at best O(n).

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)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