Webinar 2022 Speeding up Python code with Numba

From SHARCNETHelp
Jump to navigationJump to search

Python is a programming language that is very convenient to use for rapid code development. However, Python code can sometimes run over 100 times slower than comparable code written in a programming language that can be compiled to machine code. One solution to this problem is to automatically convert Python code to machine code. This is the approach offered by Numba, an open-source JIT (Just-in-time) compiler for Python, that can translate a subset of Python and Numpy code into fast machine code. It usually only requires the programmer to add some decorators to Python code so that efficient machine code can be produced. In addition, some changes may have to be made to avoid using Python features which Numba cannot efficiently translate into machine code. This seminar will provide an overview of Numba usage with some examples. It will also discuss some common problems with using Numba.