~/talk

Using Numba Effectively Today

Talkat PyData NYC 2022 · 2022-11-09..11-11· [python]
slides:none on file

Numba is a JIT compiler for NumPy that compiles functions on first use so the initial call is slower but subsequent calls run much faster; use @jit or the engine/nopython (njit) option to force nopython vs object mode and check compilation messages. Elementwise Python loops can see ~10x speedup on tight loops, making them competitive with vectorized NumPy (examples show vanilla vector ~461ms, compiled ~248ms, compiled parallel ~95ms). Fastmath gives small extra gains; GPU/CUDA support exists.

AI-written summary · about

  1. 0:00Numba and JIT compilation
  2. 3:36Python vs compiled languages
  3. 6:24Numba for NumPy and speed
  4. 8:09Object vs NumPy mode
  5. 10:34Numba performance limits
  6. 11:59Numba with GPUs
  7. 13:22Hands-on exercises
  8. 17:04First Jupyter notebook
  9. 19:10Basic Numba timing
  10. 23:45Vectorized vs element-wise
  11. 27:22Speeding up loops
  12. 31:15Fast Math mode
  13. 34:12Parallel execution
  14. 36:45Next steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.