by devxpy · 6y ago · 0 comments
The argument of "some code won't get faster" is null, since you typically only want to use `@njit`, which ensures that you're in `nopython` mode.
I guess that's a double edged sword, in that when it says `nopython`, it really does mean no python.
This means you can only use features from the python interpreter that the numba team has re-implemented in LLVM IR.
---
IIRC `@njit` does involve an overhead in `lowering` the types from python -> LLVM when the first njit function in the call graph is invoked, but not after that.
All this means that if you use `for-loops` in nopython mode, they are guaranteed to run faster, at least in my experience.
No comments yet.