The Backend Engineering Show with Hussein Nasser

They made Python faster with this compiler option

The Backend Engineering Show with Hussein Nasser

Show Notes

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

More from The Backend Engineering Show with Hussein Nasser

Oct 22, 2026

I discuss the state of what will be happening in the coming few years and why I encourage the 3 of you who want to be elite engineers to keep their critical thinking sharp. To pause and think before prompting.

Oct 15, 2026

This is a conversation with Rashed Hasan, a PhD Candidate from the University of Nebraska. We chatted about databases, ORMs and how to use AI without losing yourself. Rashed pagehttps://www.mdrashedulhasan.me/homepage

Sep 25, 2026

I discuss loops engineering and how it will numb creative thinking and critical system design for engineers.

Sep 18, 2026

I like SQL but the standard should have included ways to hint instead of the abstraction of "let me do it for you"

Sep 11, 2026

In this episode I explore why you should take some time to examine the operation you are caching before doing so. And why caching is a cop-out

See all episodes →