The Curious Engineer

All blogs / Compilers

Max Bernstein's Blog

bernsteinbear.com

CompilersPerformance / optimizationRuby / RailsLisp / Clojure / Scheme

Posts
123 from 25 Jul 2012 to 21 Oct 2026
Posting
monthly (21 in the last year)
Kind
personal blog
Feed
https://bernsteinbear.com/feed.xml

2026 16

  1. Rails is a JIT compiler
  2. Objects, attributes, maps, oh my!
  3. Support Local Variables
  4. Another partial SSI trick with canonicalize
  5. A quick look at zero-knowledge proofs
  6. The inliner is yielding benefits for ZJIT
  7. Travel notes: PLDI Boulder
  8. A survey of inlining heuristics
  9. Checking assembly with Z3
  10. Travel notes: RubyKaigi Hakodate
  11. Partial static single information form
  12. Value numbering
  13. Using Perfetto in ZJIT
  14. A fuzzer for the Toy Optimizer
  15. Type-based alias analysis in the Toy Optimizer
  16. A multi-entry CFG design conundrum

2025 30

  1. The GDB JIT interface
  2. ZJIT is now available in Ruby 4.0
  3. Load and store forwarding in the Toy Optimizer
  4. How to annotate JITed code for perf/samply
  5. A catalog of side effects
  6. Walking around the compiler
  7. Linear scan with lifetime holes
  8. Linear scan register allocation on SSA
  9. Liveness analysis with Datalog
  10. Compiling a Lisp: Closure conversion
  11. How to use snprintf
  12. ClassDistribution from S6 JIT is really neat
  13. Heating water from afar
  14. Travel notes: PLDI Seoul
  15. What I talk about when I talk about IRs
  16. Zero-overhead checks with fake stack overflows
  17. A simple search engine from scratch*
  18. ZJIT has been merged into Ruby
  19. Writing that changed how I think about PL
  20. Precedence climbing
  21. Nix derivations by hand, without guessing
  22. Parsing to IR and lvalues
  23. Prospero challenge, now with more garbage collection
  24. Optimizing Django by not being silly
  25. Visualizing big data
  26. Representing type lattices compactly
  27. Interprocedural sparse conditional type propagation
  28. A catalog of ways to generate SSA
  29. A compiler IR for Scrapscript
  30. Weak references and garbage collectors

2024 19

  1. Into CPS, never to return
  2. A multi-emulator Gameboy tracer
  3. You can use C-Reduce for any language
  4. On the universal relation
  5. Adding row polymorphism to Damas-Hindley-Milner
  6. Damas-Hindley-Milner inference two ways
  7. What's in an e-graph?
  8. microui+fenster=small gui
  9. Precedence-aware pretty printing
  10. Abstract interpretation in the Toy Optimizer
  11. Some tricks from the Scrapscript compiler
  12. TCC does support __attribute__(section(...)), actually
  13. A baseline scrapscript compiler
  14. Compilers for free with weval
  15. Waking my computer from afar
  16. Neat parallel output in Python
  17. Vectorizing ML models for fun
  18. scrapscript.py
  19. Type information for faster Python C extensions

2023 5

  1. Building a small REPL in Python
  2. A quick look at destination-driven code generation
  3. Ninja is enough build system
  4. Compiling ML models to C for fun
  5. Compiling typed Python

2022 5

  1. Inline caches in the Skybison Python runtime
  2. Writing a symbolizer for the Cinder JIT
  3. How we use binary search to find compiler bugs
  4. How the Cinder JIT's inliner works
  5. Discovering basic blocks

2021 3

  1. Small objects and pointer tagging
  2. Inline caching: quickening
  3. Inline caching

2020 12

  1. Compiling a Lisp: Labelled procedure calls
  2. Compiling a Lisp: Instruction encoding interlude
  3. Compiling a Lisp: Heap allocation
  4. Compiling a Lisp: If
  5. Compiling a Lisp: Let
  6. Compiling a Lisp: Reader
  7. Compiling a Lisp: Primitive binary functions
  8. Compiling a Lisp: Primitive unary functions
  9. Compiling a Lisp: Booleans, characters, nil
  10. Compiling a Lisp: Integers
  11. Compiling a Lisp: The smallest program
  12. Compiling a Lisp: Overture

2019 3

  1. Recursive Python objects
  2. Understanding the 100 prisoners problem
  3. Bytecode compilers and interpreters

2018 4

  1. JumboSmash: a technical retrospective
  2. How to mess with your roommate
  3. Driving student programs
  4. I'm confused

2017 13

  1. How to shoot yourself in the foot without really trying
  2. Writing a Lisp, Part 18: No Define
  3. Writing a Lisp, Part 17: Modules
  4. Writing a Lisp, Part 16: Standard Library
  5. Writing a Lisp, Part 15: I/O
  6. Writing a Lisp, Part 14: Comments
  7. Writing a Lisp, Part 13: Let
  8. Writing a Lisp, Part 12: Metacircular Evaluator
  9. Writing a Lisp, Part 11: Primitives 3
  10. Writing a Lisp, Part 10: Closures
  11. Writing a Lisp, Part 9: Quote
  12. Writing a Lisp, Part 8: ASTs
  13. Writing a Lisp, Part 7: Primitives 2

2016 8

  1. Writing a Lisp, Part 6: Primitives 1
  2. Writing a Lisp, Part 5: If-Expressions
  3. Writing a Lisp, Part 4: Environments
  4. Writing a Lisp, Part 3: Lists
  5. Writing a Lisp, Part 2: Symbols
  6. Writing a Lisp, Part 1: Booleans
  7. Writing a Lisp, Part 0: Fundamentals
  8. An error in ML that caused me much grief

2014 1

  1. The cost of applying to college: data

2012 4

  1. A quest for anonymity
  2. DNS tunneling, or, how to get around Gogo
  3. Dictionary
  4. New public key!