diff --git a/content/post/try-cpython-jit/index.html b/content/post/try-cpython-jit/index.html index 0392bb81..ec77b9f9 100644 --- a/content/post/try-cpython-jit/index.html +++ b/content/post/try-cpython-jit/index.html @@ -53,7 +53,8 @@
I don't know of any major platforms that are distributing pre-built binaries of CPython with the JIT built-in. (Please let me know if I'm wrong.) So, we'll have to build our own!
-The CPython core puts a lot of effort into making Python straightforward to build. I won't rehash their setup and build instructions here, as they're fairly comprehensive. This post is written assuming you're building in a POSIX/Linux environment - see the section at the end for information on building for Windows.
+The CPython core puts a lot of effort into making Python straightforward to build. I won't rehash their setup and build instructions here, as they're fairly comprehensive.
+This post is written assuming you're building in a POSIX/Linux environment - see the section at the end for information on building for Windows.
Suffice to say, we'll pick up assuming you have:
git
and make
We now have a debug build of Python! For our purposes, this will enable us to run with a special environment variable that will print out what's going on with the JIT in realtime. Setting PYTHON_LLTRACE=X
will display increasing volumes of information as X increases from 1 to 5.
Let's give ourself a short snippet of Python to run, so we can see how the output differs as PYTHON_LLTRACE
increases. If this code seems a bit contrived - it is!
LLTRACE=1
The lowest value of LLTRACE
will print minimal messages, indicating that traces were created and where but providing no real detail. It also enables the printing of any optimization errors, like unknown opcodes or running out of space to store traces.