Skip to content
Allex edited this page Jan 8, 2026 · 1 revision

perf performance measurements

Includes the C calls. ref

  • Make sure Python is installed with frame-pointers, the JIT way is too slow.
    CFLAGS="-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer" pyenv install <version>
  • Run your program with perf.
    perf record -g python -X perf <python command>
  • Show the profile data.
    perf report

Clone this wiki locally