Why performance actually matters (but gets widely ignored), with Casey Muratori

The Pragmatic Engineer
01:53:54 Summary & quotes Report Issue
Loading transcript... Click for full transcript
About this episode Casey Moratory argues that software performance is widely ignored due to enterprise monopoly effects and a mis… AI summary

Casey Moratory argues that software performance is widely ignored due to enterprise monopoly effects and a misunderstanding of optimization, advocating instead for a theoretical performance baseline approach over simple profiling. He emphasizes that reading assembly language is essential for understanding hardware capabilities and avoiding architectural pitfalls like serial dependencies, which render later optimization impossible. The conversation also touches on the craftsmanship of coding, the impact of AI on developer autonomy, and the historical parallels between the rise of game engines and current AI coding tools.

Key takeaways 7
  • Optimization Misconception: Most developers believe optimization is just profiling and fixing hotspots. Casey argues this is incorrect; true optimization requires knowing the theoretical maximum performance of the hardware and measuring the delta, rather than just finding local minima.
  • Serial Dependencies: The primary reason 'premature optimization' is often misused is that developers create serial dependency chains (e.g., sequential network requests) during architecture. These cannot be fixed by later optimization and require rewriting the entire system.
  • Assembly Language Utility: Reading assembly is not about writing it, but about understanding what the CPU is actually doing. It allows engineers to read hardware diagrams, understand cache/branch prediction behaviors, and see why high-level languages (like Python) have massive overhead compared to C.
  • Performance as a Differentiator: New software products (like Bun, Linear, Geary) are winning market share by explicitly pitching performance advantages against incumbents, proving that performance is a viable competitive strategy in consumer-facing apps.
  • Games Industry Parallel: The rise of licensable game engines (Unreal, Unity) democratized game development but flooded the market, making marketing and distribution more critical than product quality alone. Casey predicts a similar trajectory for AI coding tools.
  • AI and Autonomy: Developers with high autonomy view AI as a tool to offload unwanted tasks, while those with low autonomy view it as a threat or mandate. This creates 'AI fatigue' and burnout among developers who feel their craftsmanship is being devalued.
  • Good Code Definition: Good code is straightforward, minimally redundant, and structured in a way that allows the compiler to optimize it effectively. Over-engineering with polymorphism and virtual functions often blocks compiler optimizations, leading to slower code.
Notable quotes 5 AI-generated: wording and quote attribution may be wrong. Use the play link to verify.
  • “If you can vertically center a div in HTML, then you can probably learn assembly language.”
    ▶ 0:17 Casey argues that assembly language is simpler than modern web development stacks and accessible to most developers.
  • “Premature optimization is the root of all evil... The problem comes when you don't know if the choice that you're making produces that kind of optimizable hotspot... you created a serial dependency chain.”
    ▶ 1:18 Explaining why the 'premature optimization' adage is often misused to avoid thinking about architectural performance constraints.
  • “The correct way to do optimization is very much like what you just said you first go what are the operations that this system has to perform form. What is the underlying hardware capable of doing at its theoretical peak? And then you measure the delta between that theoretical maximum and what you have achieved.”
    ▶ 23:56 Defining the proper methodology for performance engineering versus simple profiling.
  • “If I just wanted an AI to program them, I'd just go get the Unreal Engine.”
    ▶ 0:33 Casey explaining his personal choice not to use AI coding agents for his own projects, framing it as a philosophical preference for craftsmanship.
  • “The more people are doing performance, the less people need to do performance... It's infectious.”
    ▶ 54:40 Describing how better libraries and APIs created by performance-aware engineers benefit all downstream users.

Chapters & Sections (44)

0:00 Early Programming History and Assembly chapter 3
1:50 Sentry Autofix Demonstration
3:21 Early Computing History and Microsoft Gaming
6:30 Windows Graphics API Limitations for Gaming
8:42 Early Windows Gaming and DirectX Origins chapter 2
10:50 Chris Hecker's Role in Windows Gaming
12:36 Career Path and Independent Development
15:59 Why Software Performance Is Ignored chapter 1
18:31 Performance as a Competitive Strategy
21:33 Theoretical Performance Optimization vs Profiling chapter 2
23:40 Optimization vs Local Minima
25:28 Reading Assembly for Hardware Insight
30:16 Premature Optimization and Serial Dependencies chapter 1
33:09 Serial Dependency Chains in Software Architecture
36:05 Architectural Performance Planning and Hotspots chapter 1
38:39 Tech Stack Migration for Performance
41:28 Learning Performance Through Assembly chapter
46:33 CPU Architecture Impact on Performance chapter 2
49:00 CPU Architecture Importance Over Assembly
50:28 CPU Data Movement and Instruction Flow
52:35 Software Craftsmanship and Performance Optimization chapter 1
54:40 Game Development vs SaaS Evolution
57:57 Game Engine Development Risks and Code Reuse chapter 1
1:01:02 Engine Risk and Code Reuse
1:03:44 Game Engine Impact on Industry and Market Saturation chapter 2
1:05:43 Game Engines as AI Parallel
1:07:34 Market Saturation and Marketing Necessity
1:11:12 GTA 6 Development and Live Service Strategy chapter 1
1:13:42 GTA 6 as GTA 5 Replacement
1:16:35 Clean Code vs Performance and Compiler Optimization chapter 1
1:21:04 Pragmatic Approach to Test-Driven Development
1:24:19 Defining Good Code and Software Engineers chapter 1
1:26:40 Balancing Code Performance and Maintainability
1:29:25 Defining Great Software Engineers and AI chapter 2
1:32:07 Skepticism Toward Received Programming Wisdom
1:33:48 Philosophical Reasons Against Using AI
1:35:54 Traditional Craftsmanship vs Automated Software Production chapter 3
1:37:56 Human Craftsmanship and AI Adoption
1:40:08 Assessing AI Code Usability Timeline
1:41:44 Evaluating AI Software Productivity Impact
1:44:32 AI Burnout and Workplace Autonomy chapter 3
1:47:07 Autonomy and AI Adoption Psychology
1:49:12 Reading Research Papers for Programming
1:51:23 Performance, Assembly, and Game Industry History

Transcript

Loading transcript...