In this video I introduce Numba which can make your python code 1000x faster. Numba is a just in time compiler for a subset of Python and Numpy. The first half of the video is dedicated to a basic intro and to highlighting a number of very common mistakes people make when using Numba. The remaining video show how to use Numba in a real world-ish simulation problem and shows the code running 1000x faster with Numba in both single and multithreaded cases, and concludes with a "reading list" for learning more about Numba.
Twitter: https://twitter.com/safijari
Find the notebook here: https://gist.github.com/safijari/fa4eba922cea19b3bc6a693fe2a97af7
MY OTHER VIDOES:
○ A.I. Learns to play Snake https://www.youtube.com/watch?v=i0Pkgtbh1xw
○ 5 Common Python Mistakes: https://www.youtube.com/watch?v=fMRzuwlqfzs
○ 5 Amazing Python Libraries: https://www.youtube.com/watch?v=eILeIEE3C8c
○ Making Python fast: https://www.youtube.com/watch?v=XW32lPcWOxg
○ Learning programming language Julia: https://www.youtube.com/watch?v=TNoShNPoEak
Deeper topics to discover here
https://numba.pydata.org/numba-doc/dev/user/5minguide.html#other-things-of-interest
Supported python and numpy features
https://numba.pydata.org/numba-doc/dev/reference/pysupported.html
https://numba.pydata.org/numba-doc/dev/reference/numpysupported.html
Important differences from python https://numba.pydata.org/numba-doc/dev/reference/pysemantics.html
Defining types to compile at definition time: http://numba.pydata.org/numba-doc/latest/user/jit.html#eager-compilation
Function factories https://numba.pydata.org/numba-doc/dev/user/generated-jit.html
Experimental version of jitted classes https://numba.pydata.org/numba-doc/dev/user/jitclass.html
Debugging https://numba.pydata.org/numba-doc/dev/user/troubleshoot.html
Dealing with types https://numba.pydata.org/numba-doc/dev/reference/types.html
Ahead of time compilation for deployment https://numba.pydata.org/numba-doc/dev/user/pycc.html
Using approximate fastmath https://numba.pydata.org/numba-doc/dev/user/performance-tips.html#fastmath
Deeper control of threading via tbb and/or omp https://numba.pydata.org/numba-doc/dev/user/threading-layer.html
Easily put your computation on a GPU!
https://numba.pydata.org/numba-doc/dev/cuda/index.html
https://numba.pydata.org/numba-doc/dev/roc/index.html
F.A.Qs https://numba.pydata.org/numba-doc/dev/user/faq.html
#numba #programming #python