Cover of Building an optimizing compiler

Building an optimizing compiler

by Robert Morgan · first published 1998

8mentions
5recommended by
7HN commenters
2010–2023first – last mentioned

71% recommend29% neutral

Why HN recommends it

A focused treatment of compiler backend optimizations, skipping parsing and type checking. Covers control flow graphs, alias analysis and SSA. Recommended for readers wanting depth on optimization over front-end topics.

Summarised by Claude from recommending comments

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

10 2007: 0 mentions2008: 0 mentions2009: 0 mentions2010: 1 mention2011: 1 mention2012: 0 mentions2013: 0 mentions2014: 1 mention2015: 0 mentions2016: 0 mentions2017: 1 mention2018: 1 mention2019: 0 mentions2020: 0 mentions2021: 0 mentions2022: 1 mention2023: 1 mention2024: 0 mentions2025: 0 mentions2026: 0 mentions200720172026

What Hacker News says

  • cestith · Feb 17, 2017 · Recommends

    I already answered about "The Art of the Metaobject Protocol" but then two more language-implementation-centric books came to mind today. 1. "Writing Compilers and Interpreters" by Ronald Mak 2. "Building an Optimizing Compiler" by Bob Morgan Morgan's book is well sought after and out of print. It's one of the few books in the field for which the print edition prices keep climbing.

    on “Ask HN: What are some books where the reader learns by building one project?” ↗
  • SamReidHughes · Jul 29, 2018 · Recommends

    This book is not completionist but instead it's to the point and avoids wasting your time: https://www.amazon.com/gp/aw/d/155558179X/ [Edit: it's Building an Optimizing Compiler by Bob Morgan.] That's assuming you don't want to waste your time reading about parsing, type checking, or serializing an AST into some form of assembly, the parts of a compiler which just aren't that…

    on “Ask HN: What are the best resources to learn about compilers?” ↗
  • trealira · Dec 11, 2023 · Recommends

    Bob Morgan's book Building an Optimizing Compiler is entirely focused on modern compiler optimizations (and it was published in 1997). It goes over building a control flow graph, various optimizations you can do with that, alias analysis, static single…

    on “Write your own retro compiler” ↗
  • kenjackson · Aug 16, 2010 · Recommends

    …talking about the front-end of the compiler the crazy interesting stuff is in the backend. The new Dragon book greatly improves here over the old one, but I'd also recommend two other texts: 1) Morgan, Building an Optimizing Compiler -- some people love the writing style. Others hate it, but the material is solid. 2) Muchnick, Advanced Compiler Design and Implementation -- Great book. Must read if you're serious about optimizations.

    on “Rich Programmer Food” ↗
  • astrange · Jun 25, 2022 · Recommends

    The Dragon Book is a bad compiler book. Don’t recommend it just because it has a cool name. Grune’s Parsing Techniques and Morgan’s Building an Optimizing Compiler are okay.

    on “Crafting Interpreters: A Review” ↗
  • rayiner · Aug 7, 2014 · Mentions

    Morgan's "Building an Optimizing Compiler" recommends doing a "spike" method: http://www.amazon.com/Building-Optimizing-Compiler-Bob-Morga.... The idea is that you should write enough of each stage, from the front-end to the back-end, to get…

    on “If I ever design a first course in compilers, I'll do it backwards” ↗
  • trealira · Dec 11, 2023 · Mentions

    …a compiler: VAX-11 code generation and optimization, which was published in 1982, talks about the design and implementation of the PL/I compiler for the DEC VAX-11. You can compare it to Bob Morgan's Building an Optimizing Compiler, which was published in 1997. The techniques he discusses there are a lot closer to how LLVM works today than the 1982 book.

    on “Write your own retro compiler” ↗
  • sb · Feb 10, 2011 · Mentions

    …coloring) for important backend optimizations. I think that gives a firm understanding of compilers, suitable for further study (such as Muchnick "Advanced Compiler Design and Implemetation" 1997 or Morgan "Building an Optimizing Compiler" 1998.)

    on “Engineering a Compiler, 2nd Edition is out” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help