elvijs / fun_with_profilers

Playing around with various Python profilers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This package plays around with various profilers through the lens of Mandelbrot set computers. Heavily inspired by "High Performance Python" by Gorelick & Ozsvald.

  • Run the scripts in mandelbrot.profilers to interact with the (basic) profiler integrations.
  • Run the scripts in mandelbrot.implementations to interact with the different Mandelbrot set implementations.

Setup

We use a standard Poetry setup.

Caveats:

  • For me, poetry shell does not work in PyCharm. Always use a fresh standalone terminal. This is relevant for profilers that run outside the Python interpreter.
  • Depending on your poetry install, you may have to run source $HOME/.poetry/env before running any poetry commands.

TODO

Profilers:

  • is there a good profiler for tracking multi-process applications?

Mandelbrot implementations:

  • A pure CUDA version, maybe using PyCUDA? Or maybe cupy?
  • the naive implementation, but threaded
  • the naive implementation, but multi-process
  • C implementations, see Chapter 7 in "High Performance Python".
  • A Rust implementation, see PyO3.

About

Playing around with various Python profilers


Languages

Language:Python 94.4%Language:Shell 5.6%