transonic.justintime
Cached JIT compilation
User API
Internal API
- class transonic.justintime.ModuleJIT(backend_name: str, frame=None)[source]
Bases:
object
Representation of a module using jit
Notes
Serge talked about @jit (see https://gist.github.com/serge-sans-paille/28c86d2b33cd561ba5e50081716b2cf4)
It’s indeed a good idea!
At import time, we create one .py file per jit function.
At run time, we create (and complete when needed) a corresponding .pythran file with signature(s).
The jit decorator:
at the first call, get the types, create the .pythran file and call Pythran.
then, try to call the pythran function and if it fails with a Pythran TypeError, correct the .pythran file and recompile.
Note: During the compilation (the “warmup” of the JIT), the Python function is used.
Functions
|
Decorator to record that the function has to be jit compiled |
|
Classes
|
Decorator used internally by the public jit decorator |
|
Representation of a module using jit |