/Compiler

The Story Of Reformatting 100k Files At Google In 2012

- Laurent Le Brun tl;dr: “Back in September 2012, I was a junior engineer at Google, working on Google’s build tool, also known internally as Blaze. One day, a mysterious calendar invite landed in my inbox. It was sent by two engineers in the US, and I was invited along with my team lead. I quickly recognized the names: Rob Pike and Russ Cox.”

featured in #524


Compilers For Free With Weval

- Max Bernstein tl;dr: “It’s all about taking an existing program, modifying it to hold some of its inputs as constants, and then letting the compiler / optimizer go hog wild on it. The result is still a program — not a value — and it’s usually faster than the original program.”

featured in #516


I Wrote A String Type

- Miguel Young De La Sota tl;dr: Miguel explores the intricacies of string representation in Rust, critiquing common string types for their memory inefficiencies. The author introduces "byteyarn," a string type optimized for memory usage, emphasizing its properties like "Small String Optimization" (SSO) and compatibility with 'static lifetime strings. The piece further discusses layout optimization, stealing bits, and niche optimization to achieve memory efficiency.

featured in #447


Building A Tiny Compiler From Scratch Is Fun

- James Smith tl;dr: "There are a lot of approaches to tiny compilers and small languages that are fun by themselves. The reason for small languages is that they can be implemented with little work, and I can get something working in a short amount of time, leaving me more time for exploration and fun stuff."

featured in #413


How To Build An Evil Compiler

- Akila Welihinda tl;dr: "Did you know there is a type of compiler backdoor attack that is impossible to defend against? In this post I’ll show you how to implement such an attack in less than 100 lines of code."

featured in #309


The Weirdest Compiler Bug

- Scott Rasmussen tl;dr: "There are approximately 7.5x10^18 grains of sand on Earth. This story is about finding changes in an equation that has a difference of approximately 1e-18 out of hundreds of billions of calculations."

featured in #224


Let The Compiler Do The Work

- Fortuna Eruditis Favet tl;dr: In Part of 6 of this Rust tutorial, Fortuna walks through how we'd rewrite a program from scratch in Rust, relying on compiler auto-vectorization.

featured in #168