Power up your work with compiling and profiling
summary
Workshop demonstrates using Numba to speed numeric Python: profiling with cProfile identifies backprop and element‑wise loops as hotspots, then applying Numba JIT (njit) and no-python mode compiles heavy loops into native code and yields multi‑core and fastmath gains (often multiple× faster after compilation). Key gotcha: first call compiles and is slower, so repeat calls matter. The hands‑on builds a small neural net on MNIST, profiles it, compiles looped functions, and shows the compilation overhead and subsequent speedups.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 18:23Profiling and compiling basics
- 33:56Loops slow Python
- 53:32Debugging Numba issues
- 1:11:44Profiling neural network training
- 1:24:26Numba and profiling exercise
- 1:30:50Q&A
related talks
37mUsing Numba Effectively Today
22mSupercharge Scientific Computing in Python with Numba
37mAccelerating Scientific Computing in Python with Numba: A Real-World Example
30mNumba, a JIT compiler for fast numerical code
27mSpeed up Python with hardware accelerators
22mExperiences making CPU-bound tasks run much faster
01h 31mDebugging and profiling techniques
37mBoost The Performance with Codon
