Take a look into numba, you add a decorator to your function and it turns it into compiled code.
It's JIT only, and it needs to be in a particular shape to be effectively compiled. It's mostly for numeric code, but there are many other cases where native code would be better.
It's JIT only, and it needs to be in a particular shape to be effectively compiled. It's mostly for numeric code, but there are many other cases where native code would be better.