Hacker News new | ask | show | jobs
by pbowyer 2097 days ago
> We got numba, which seems to work automagically in the official demo snippets and zilch in your own. 'That's because you're using them wrong', the smart people tell you on stackoverflow.

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.

1 comments

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.

> 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.