How to Supercharge your Python Code with Numba

13 ноября

Тезисы

The prominent reasons for the wide adoption of Python is the ease of learning, usability and readability coupled with the powerful ecosystem of Python packages. This often makes Python an attractive language for researchers & scholars to undertake computational projects and thesis. The ease of prototyping and tinkering allows for higher number of iterations and customization, leading to an increase in research output. But, a major pain point of using Python is its speed when compared to languages like C++ or FORTRAN which are still widely used in research. Scholars, when hit by the performance bottleneck of python code, often come across some methods to increase their code performance like using PyMPI, Numpy or CPython. But, the learning curve is steep and APIs get less familiar. If learning Python is so easy, why should increasing the performance of Python code be so difficult? This talk will address this question and introduce Numba, an open source JIT compiler that translates Python and NumPy code into fast machine code. Talk attendees will delve into 3 real world computational exercises (including speeding up an actual open source project) which will demonstrate the core concepts, ease and effectiveness of using Numba. We will learn how Numba can be useful in lowering the barrier to achieve code performance for scientific computing using Python.

The talk will be divided into the following sections:

  1. Why Numba?
  2. Example #1: Mandelbrot Set
  3. Example #2: Solving Poisson Equation (Heat Transfer)
  4. Example #3: Speeding up BlurHash project with Numba
  5. Closing Remarks and Q&A.

Open Source

Ankit Mahato

I am a die hard Pythonista, an open source contributor (numba & titus2) and a former GSoC scholar under Python Software Foundation. With more than 8 years of industrial and research experience in scientific computing, machine learning and data visualization, I have spent a considerable amount of time developing an expertise in handling and speeding-up the entire data analytics pipeline comprising — ingestion, exploration, transformation, modeling and deployment. I have also previously given talks on Numba in the following international conferences — PyCon India, SciPy India, PyCon Estonia & PyData Global.

I am a die hard Pythonista, an open source contributor (numba & titus2) and a former GSoC scholar under Python Software Foundation. With more than 8 years of industrial and research experience in scientific computing, machine learning and data visualization, I have spent a considerable amount of time developing an expertise in handling and speeding-up the entire data analytics pipeline comprising — ingestion, exploration, transformation, modeling and deployment. I have also previously given talks on Numba in the following international conferences — PyCon India, SciPy India, PyCon Estonia & PyData Global.