Reduce perf trampoline overhead

Đang mở
#161,676 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
performance

Hướng nghiên cứu

Start by reading the linked PR gh-161677, which may show where work has moved. The issue identifies the -X perf PEP 523 trampoline and reports slowdowns across generators, calls, and pyperformance, but names no files or tests. Compare the implementation and benchmark results there; done means reducing the reported overhead.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

interpreter-core performance type-feature

-X perf makes Python code much slower. The perf trampoline is a PEP 523 hook, so specialized calls and generator resumes are disabled while it is active, and the trampoline evaluator keeps an extra native frame alive on every call.

Slowdown with -X perf on main (PGO + ThinLTO, Clang 21):

Benchmark Slowdown
generators +234%
generator_resumes +72%
python_calls +50%
scimark_lu +42%
pyperformance (geometric mean) +12%
Linked PRs
  • gh-161677
Ngôn ngữ chính
Python
Star
78.2k
Fork
36.6k
Merge trung bình
19 giờ 57 phút
Pull request đã merge (30 ngày)
630

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python/cpython

Tất cả issue của python/cpython

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.