Skip to content

TypedPython 2: compile @compiled modules through Cython on desktop #23

Closed as not planned

Description

@b-re-w

What

For modules or functions marked @compiled (notation decided in design §8 #1): use the gate's inferred types to emit Cython pure-Python-mode annotations, build a CPython extension for the desktop targets (macOS arm64 first, then Linux/Windows in CI), and import it from the embedded interpreter in place of the .py module. int compiles as i64, promoting to a big integer on overflow (design §8 #2 proposal). Python semantics are unchanged.

Done when

  • Each benchmark's compiled output equals its interpreted output.
  • nbody and spectral-norm compiled run ≥ 10× faster than CPython, measured alone.
  • Every construct that Cython's pure mode rejects is listed (it becomes the requirement list for stage-2 IR).

Activity

  1. b-re-w commented on Oct 2, 2026

    @b-re-w
    MemberAuthor

    Superseded by #41. The Cython backend was dropped; stage 2 lowers a typed IR to C directly.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions