thautwarm / diojit

Fully compatible CPython jit compiler. Optimising Dynamic, Interpreted, and Object-oriented(DIO) programs.
BSD 2-Clause "Simplified" License
117 stars 2 forks source link

separate compilation process #12

Open thautwarm opened 3 years ago

thautwarm commented 3 years ago

After generating cython code, the compilation(cythonize + cc compile .c to .pyd) could be proceeded in a separate process.

Without this, there will be a notable JIT latency.

root_func = jit_root(func)
root_func(arg1, arg2) # root_func uses the original implementation if func hasn't been specialised and compiled yet.
thautwarm commented 3 years ago

No need so far. JITing a method now is damn fast. However, I'd keep this issue, as @lfkdsk pointed out, it is possible for python to send compilation tasks to multiple processes, which will send back the tasks to julia, which is in the same process with python.