PyCon India 2025

ArryPy: Array You Fast Enough?
2025-09-12 , Room 5

Building your own minimalist NumPy like, ArryPy, it reveals the secret sauce behind high-performance array computing.

In this hands-on workshop, you’ll start with a naïve Python loop, then progressively supercharge it: first pure-Python ufuncs, next Cython-typed memoryviews, and finally native C with SIMD via pybind11.

Along the way, you’ll benchmark each stage in a live leaderboard, turning optimization into a competition. You’ll leave equipped with concrete skills in profiling, vectorization, and extension modules—and a clear roadmap for writing faster Python code in any project.


The main aim of this workshop is to build a numpy like library that will extract as much performance from Python as possible.

  1. First implement a basic class based library which people can start building, testing bed will be provided to then to easily verify whatever they are building. Basically using a lot of dunder methods.

  2. Broadcasting Logic in Python and Zero-Copy Views, Build slicing that returns views, not copies. Add stride-trick logic to handle mismatched shapes

  3. Start replacing working codes with Cython

  4. Replace Cython with Native C & SIMD via pybind11

  5. Benchmarking & Profiling Deep Dive
    - Use pytest-benchmark for reproducible results.


Prerequisites
  • Comfortable with Python classes and magic methods (add, getitem, etc.)
  • Understanding basic compilation in C.
  • Writing Basic C code.
Target Audience

Intermediate

Abhik Sarkar is an experienced Python Machine Learning Engineer with over eight years of expertise in scalable, intelligent solutions. He currently leads the Machine Learning department at a high-growth startup specializing in computer vision technologies for safety and security.

Developer working at the intersection of DevOps, machine reliability, and system observability using Python to bridge logic and low-level performance.