# They made Python faster with this compiler option

> Episode of [The Backend Engineering Show with Hussein Nasser](https://podistic.com/podcast/the-backend-engineering-show-with-hussein-nasser.md) · Published May 7, 2024 · Duration 29:04

- **Listen on Podistic:** https://podistic.com/episode/they-made-python-faster-with-this-compiler-option
- **Audio:** https://anchor.fm/s/1eb6d14/podcast/play/86404376/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fproduction%2Fexports%2F1eb6d14%2F86404376%2Ff39f7f6af13601fea3153fcf9e3a21b7.m4a (audio/x-m4a)

## About this episode

Fundamentals of Operating Systems Course https://oscourse.win Looks like fedora is compiling cpython with the -o3 flag, which does aggressive function inlining among other optimizations. This seems to improve python benchmarks performance by at most 1.16x at a cost of an extra 3MB in binary size (text segment). Although it does seem to slow down some benchmarks as well though not significantly. O1 - local register allocation, subexpression elimination O2 - Function inlining only small functions O3 - Agressive inlining, SMID 0:00 Intro 1:00 Fedora Linux gets Fast Python 5:40 What is Compiling? 9:00 Compiling with No Optimization 12:10 Compiling with -O1 15:30 Compiling with -O2 20:00 Compiling with -O3 23:20 Showing Numbers Backend Troubleshooting Course https://performance.husseinnasser.com
