2021 H2 static Python roadmap

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

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
15/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
compilers

Hướng nghiên cứu

Issue này là một roadmap phạm vi rộng bao quát trình biên dịch tĩnh, trình tải module, trình kiểm tra kiểu, runtime, JIT và công việc về hiệu năng, thay vì một thay đổi đơn lẻ có phạm vi rõ ràng. Hãy bắt đầu bằng cách chọn một mục ưu tiên duy nhất và xác định subsystem liên quan; việc hoàn thành phải được xác định bởi hành vi cụ thể và việc validation của mục đó, không phải bởi toàn bộ roadmap.

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

Mô tả

staticpython

Usability

  • [P0] Make static python consumable easily for any Cinder user
    • Module loader in cinder
    • Consolidate rewriter logic into static compiler (out of strict modules)
    • minimum runtime version for static pycs
  • [P0] Make static python type checker run as a linter
  • [P0] Fix module dependency tracking for pyc invalidation
  • [P1] Support Enums defined in static modules
  • [P1] Expand Static Python reference guide
    • How to improve perf: primitives, CheckedDict...
    • Things that aren’t supported: multiple inheritance, metaclasses...
    • Gotchas: cbool comparison results
  • [P1] Don’t JIT all static functions
    • As we adopt more code into Static Python, not all static functions will be hot enough to deserve JIT, this should be left up to the JIT list to determine.
  • [P1] support prod_assert
  • [P1] support primitive floats
  • [P1] cross-module import always sees consistent (DeclarationVisit only) view of imported module types
  • [P1] fix patching of static functions with compatible but keyword-requiring signatures
  • [P2] improve type inference of primitive int literals

Performance

  • [P0] CheckedList
  • [P0] Optimize calls to types
  • [P0] Improved descriptor support:
    • Properties
    • Cached properties
    • class methods
  • [P1] Primitives in method calls
  • [P1] Primitives in type calls
  • [P1] More typed built-in methods
  • [P1] Dataclass intrinsic
  • [P1] Run declaration visitor on nonstatic dependency code and stubs so we can generate invokes against them
    • make sure the failure mode is appropriate Python error, not crash
    • also emit CAST on return value (helps with narrowing and Pyre compat for usability)
  • [P1] Support for runtime-checking small unions
  • [P1] avoid checking types of default argument values
  • [P1] return type of async functions
    • type-specialized await?
    • eager evaluation?
  • [P1] type-preserving user-defined decorators (util.etc, statsd.timer)
  • [P1] Declarable Exact types
    • Unlocks more non-GC containers, can declare they contain only Exact[str], which is non-GC
    • Unlocks other optimizations and statically known types also, subclasses of Python builtins can do crazy things
  • [P2] inlining decorators at compile time
  • [P2] Fixed size arrays
  • [P2] Perhaps some exploratory work around object lifetimes? Would be great to get some objects out of the GC.
    • Multiple return values that box to tuples but don’t allocate might be something slightly related
Ngôn ngữ chính
Python
Star
3.8k
Fork
139
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 facebookincubator/MetaPython

Tất cả issue của facebookincubator/MetaPython

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.