Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT Compilation #113464

Closed
brandtbucher opened this issue Dec 25, 2023 · 4 comments
Closed

JIT Compilation #113464

brandtbucher opened this issue Dec 25, 2023 · 4 comments
Labels
3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage topic-JIT type-feature A feature request or enhancement

Comments

@brandtbucher
Copy link
Member

brandtbucher commented Dec 25, 2023

It's probably about time to start thinking seriously about just-in-time compilation. To kick things off, here's my talk from this year's sprint about "copy-and-patch", which I think is a really promising path forward: https://youtu.be/HxSHIpEQRjs

I'll also be opening a draft PR for discussion soon.

Linked PRs

@brandtbucher brandtbucher added performance Performance or resource usage interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.13 bugs and security fixes labels Dec 25, 2023
@Eclips4 Eclips4 added the type-feature A feature request or enhancement label Dec 25, 2023
@cosmicexplorer
Copy link

Do you have a writeup or other non-video explainer available, or is the PR itself the best reference for this technique?

@MarshalX
Copy link

Do you have a writeup or other non-video explainer available, or is the PR itself the best reference for this technique?

Maybe this one will be helpful to you https://aha.stanford.edu/sites/g/files/sbiybj20066/files/media/file/aha_050621_xu_copy-and-patch.pdf

@brandtbucher
Copy link
Member Author

Do you have a writeup or other non-video explainer available, or is the PR itself the best reference for this technique?

There four main resources that I've been directing people towards... they each explain different things in different levels of detail:

  • The white paper: high-level overview of copy-and-patch.
  • The blog post: low-level implementation details for copy-and-patch.
  • The YouTube video: high-level overview of CPython's approach to copy-and-patch.
  • The pull request: low-level implementation details for CPython's approach to copy-and-patch.

z764969689 pushed a commit to z764969689/cpython that referenced this issue Jan 29, 2024
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information on how to install the required build-time tooling.
pull bot pushed a commit to roacn/cpython that referenced this issue Jan 29, 2024
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch
(https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information, including how to install the required build-time tooling. Merry JIT-mas! ;)
@brandtbucher
Copy link
Member Author

Done! I'll be opening follow-up issues for further improvements to both the build process and the generated code.

aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information on how to install the required build-time tooling.
aisk pushed a commit to aisk/cpython that referenced this issue Feb 11, 2024
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch
(https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information, including how to install the required build-time tooling. Merry JIT-mas! ;)
WillChilds-Klein pushed a commit to WillChilds-Klein/cpython that referenced this issue Mar 4, 2024
Add an option (--enable-experimental-jit for configure-based builds
or --experimental-jit for PCbuild-based ones) to build an
*experimental* just-in-time compiler, based on copy-and-patch
(https://fredrikbk.com/publications/copy-and-patch.pdf).

See Tools/jit/README.md for more information, including how to install the required build-time tooling. Merry JIT-mas! ;)
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
SonicField pushed a commit to SonicField/cpython that referenced this issue May 8, 2024
SonicField pushed a commit to SonicField/cpython that referenced this issue May 8, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 24, 2024
…honGH-119466)

(cherry picked from commit b48a3db)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
blhsing pushed a commit to blhsing/cpython that referenced this issue Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage topic-JIT type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants