[HN Gopher] Profiling Your Numba Code
___________________________________________________________________
Profiling Your Numba Code
Author : itamarst
Score : 24 points
Date : 2024-01-30 17:12 UTC (5 hours ago)
(HTM) web link (pythonspeed.com)
(TXT) w3m dump (pythonspeed.com)
| IshanMi wrote:
| I still remember discovering & using numba for the first time in
| university. At the time I didn't know any programming languages
| except for Python, and wasn't super great at Python either. We
| had to write and run molecular simulations for our numerical
| methods and simulations class, and people were writing their code
| in C/C++ and were blazing through it. I remember finding out
| about Numba through the High Performance Python O'Reilly book,
| and by just adding a single @jit decorator, my simulations were
| dramatically faster.
|
| Amazing stuff, honestly felt like black magic at the time.
| IanOzsvald wrote:
| That's my book :-) Micha and I are working on the 3rd edition
| right now. Cheers!
| eachro wrote:
| Do people use numba outside of scientific computing code? feel
| like for most "normal" uses, you'd probably be fine with having
| your code written in numpy or pandas, so I'd love to hear what
| people generally use numba for outside of scientific computing.
| itamarst wrote:
| You can use Numba to speed up some Pandas calculations:
| https://pandas.pydata.org/docs/user_guide/enhancingperf.html...
| IanOzsvald wrote:
| Really Numba will speed up numpy and some scipy (there's
| partial API coverage) and math based pure python. I think it is
| unlikely it'd be used away from math problems. As another
| commenter mentioned it can be used to accelerate numpy-array
| based Pandas (but not the newer Arrow based arrays), and again
| that's for numeric work.
___________________________________________________________________
(page generated 2024-01-30 23:01 UTC)