Re:Data-Oriented Programming in Python
by VHRanger on Friday September 18, 2020 @10:49AM
(#24517467)
There's a learning curve. It only works when the `@jit(nopython=True)` doesn't reject compilation.
Otherwise it's no better than python.
Generally numba works the same way writing C works: you pass in raw buffers (numpy arrays) and do processing directly on those buffers. That compiles to good LLVM bytecode and is fast.
Re:Data-Oriented Programming in Python
by pbowyer on Saturday September 19, 2020 @04:50AM
(#24526124)
> There's a learning curve. It only works when the `@jit(nopython=True)` doesn't reject compilation.
Is there a way to get it to tell you when it rejects compilation? I don't recall one at the time (this was ~4 years ago) and spent a week and a bit trying to get it to work.
That's my experience. I was working on satellite image processing at the time, lots of Python loops in the code. Numba should've made a big difference according to the demos, but when benchmarking it didn't.
Adding a single decorator sounds wonderful and I never found an answer to why it didn't work.