PEP 744: JIT Compilation

Thanks for your answers, @mdroettboom and @brandtbucher

For companies using CPython this could be a concern (simply to avoid the risk of being sued for patent infringement) and it’s good to collect such knowledge, since good patent research is hard and expensive.

I did a quick search on Google Patents, but the only patent which came up is this one:

which only appears remotely related and is expired by now.

Which doesn’t mean that there may be other patents or pending ones related to the used JIT techniques. The paper was written by Stanford scientists, so it wouldn’t be surprising to find that a patent application is underway.

Thanks, @kj0 for the added information. Here’s the link to the patent: US8769511B2 - Dynamic incremental compiler and method - Google Patents

I tried to find our whether the UC has a policy of allowing open source projects using such patents, but wasn’t successful.

This may actually be something the PSF could get involved in for the benefit of our (commercial) users, by setting up a patent license pool to which PSF sponsors would then get access.

Thanks for clearing this up. So the comment in the “Rational” section was about using LLVM at runtime. You do use LLVM at build time to compile the templates, which are then copy-and-patched at runtime with the needed details, but not at runtime.

BTW: I think it would make the PEP easier to follow, if you’d add a sentence explaining what copy-and-patch compilation is all about, e.g. based on the one you find on Wikipedia:

“Copy-and-patch compilation is a simple compiler technique that uses pre-written machine code fragments that are then patched to insert memory addresses, register addresses, constants and other parameters to produce executable code.”

Great, so these things are on the radar. I was just wondering, since I still remember how Armin’s psyco used to have issues with significant RAM usage due to the JIT keeping too many traces in memory.

Great. Thanks for the confirmation.

2 Likes