Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Optimizing compilers for modern architectures

    Optimizing compilers for modern architectures

    Randy Allen · 2002

    Computer Science
    Open LibraryAmazon
    Stats for nerds
    3recommend
    5mentions
    5people
    2010–2025years
    60% recommend40% neutral

    Mentions per year

    201020122014201620182020202220242025

    What Hacker News says

    1. chrisseatonJan 2020
      Super basic:

      * https://interpreterbook.com/

      * https://compilerbook.com/

      Somewhat more practical:

      * https://www.craftinginterpreters.com/

      ...

      massive gap here

      ...

      Serious:

      * Engineering a Compiler (even this wastes soooo much time on parsing)

      * Optimizing Compilers for Modern Architectures

      * Advanced Compiler Design and Implementation

      I'm not exaggerating or being contrary for the sake of it when I say disregard the Dragon book - we don't build compilers like that any more. It's not even like it teaches you the foundations that are still useful because I think the foundations and what we emphasise as important now have changed so much.

      thread
    2. jcranmerNov 2019
      What are you interested in learning? Compilers is quite a broad field, consider:

      * Lexing/parsing

      * Classical scalar optimizations

      * Loop (vector) optimizations

      * Code generation trifecta of scheduling, register allocation, and peepholes

      * Dataflow and static analysis

      * Interprocedural, link-time, and whole-program optimization

      * JITs (to the extent that it differs from the above)

      * Garbage collection

      * A variety of advanced topics, such as decompilation, dynamic binary analysis/rewriting, superoptimization, formal verification, etc.

      There's no resource that's going to cover everything well, and some of them (particularly the last topic) are going to best covered by reading the research papers that come out at the premier compiler conferences such as PLDI. The Dragon book, for example, mostly covers parsing, classical scalar optimizations, and code generation, giving you very little to go on for interprocedural optimization, for example. Allen & Kennedy's "Optimizing Compilers for Modern Architectures" is going to be a better resource for loop optimization.

      If you want to get these textbooks for a cheaper price, try finding a nearby university, looking up when they offer a compiler course, and seeing if the bookstore has a used copy before the semester starts. I was lucky in that the compiler class had been cancelled immediately before the semester started, so the entire pallet of books was available, offering me my choice of highest quality used book.

      thread
    3. mahmudJul 2010
      Essentials of Programming Languages.

      Engineering a Compiler.

      Managing Gigabytes.

      Advanced Programming in the Unix Environment

      Unix Network Programming

      On Lisp

      Advanced Compiler Design and Implementation

      Concepts, Techniques and Models of Computer Programming

      Design Concepts in Programming Languages

      Lambda-Calculus and Combinators (the new Hindley/Seldin book, just got it 2 weeks ago)

      Optimizing Compilers for Modern Architectures

      Abstract Computing Machines: A Lambda-Calculus Perspective

      thread
    4. RossBencinaFeb 2025
      > There are better books I would probably recommend

      I'm curious what you'd recommend.

      For what it's worth my goal was to compile to machine code. Anything less would have seemed insufficient. Later I got Appel's "Modern Compiler Implementation in Java" and Allen and Kennedy "Optimizing Compilers for Modern Architectures".

      Cooper and Torczon "Engineering a Compiler" was recommended here recently. I haven't seen it.

      thread
    5. ApanatshkaDec 2015
      I've only read a little bit in Optimizing Compilers for Modern Architectures, but it seems a pretty complete introduction: http://www.amazon.com/Optimizing-Compilers-Modern-Architectu...

      Another space you can look for interesting things (not necessarily optimising compilation) is the compilation of functional programming languages. They usually take a slightly different approach compared to imperative languages, though there's clearly a lot of overlap. I really enjoy reading in an old book called The Implementation of Functional Programming Languages from 1987, which is available online: http://research.microsoft.com/en-us/um/people/simonpj/papers...

      thread

    Related

    Cover of Engineering a compiler
    2007–2026

    Engineering a compiler

    Keith D. Cooper
    39 recommend · 91
    Cover of Memory as a programming concept in C and C++
    2008–2022

    Memory as a programming concept in C and C++

    F. Franěk
    4 recommend · 4
    Cover of Advanced compiler design and implementation
    2008–2025

    Advanced compiler design and implementation

    Steven S. Muchnick
    13 recommend · 25
    Cover of The Standard C Library
    2009–2026

    The Standard C Library

    P. J. Plauger
    17 recommend · 29
    Cover of Compiling with Continuations
    2009–2026

    Compiling with Continuations

    Andrew W. Appel
    19 recommend · 47
    Cover of C Traps and Pitfalls
    2009–2025

    C Traps and Pitfalls

    Andrew Koenig
    19 recommend · 37
    Cover of Writing A Compiler In Go
    2016–2026

    Writing A Compiler In Go

    Thorsten Ball
    33 recommend · 42
    Cover of Building an optimizing compiler
    2010–2023

    Building an optimizing compiler

    Robert Morgan
    5 recommend · 8