Paid episode

The full episode is only available to paid subscribers of Computer, Enhance!


How many CPU instructions does Python take to do one CPU instruction?
A close-up photograph of plane exhaust pipes.

This is the second video in the Prologue of the Performance-Aware Programming series. It discusses one of five multipliers that cause programs to be slow. Please see the Table of Contents to quickly navigate through the rest of the course as it is updated weekly. A lightly-edited transcript of the video appears below.

In the course overview, I specifically said there's only two things that will improve the performance of a program: you can reduce the total number of instructions you're asking the CPU to do, or you can alter those instructions to move more efficiently through the CPU. That's really all you can do: reduce the number, or increase the speed.

Everyone laughed at me for this. I couldn't hear you laughing because I'm writing this and can’t hear you when you’re reading it, but I knew you were laughing.

However, I also knew I would have my revenge. The very first thing I'm going to talk about here in the prologue is the biggest multiplier that makes code run slowly:


The full video is for paid subscribers

Programming Courses
A series of courses on programming topics.
Casey Muratori