Close to the machine

Getting results by knowing what the hardware really does.

These sources work near the metal. They read file formats, follow memory and tune code to the processor. Most offer measurements or a walk through real code.

Part of Automation. 21 sources from 4 subjects. A source can carry several themes. These tags are this wiki's own reading, not claims the sources make.

A catalog of side effects

Max Bernstein. From Compilers and interpreters.

A tour of how several optimizing compilers record what each instruction reads and writes.

A tail-call interpreter in (nightly) Rust

Posted by g0xA52A2A, with replies from many commenters. From Compilers and interpreters.

A Hacker News thread about a blog post on a Rust tail-call interpreter.

Everyone Says Assembly Is Untyped—Everyone Is Wrong

gingerBill (Ginger Bill). From Compilers and interpreters.

A design rationale for the typed inline assembly system in the Odin programming language.

How To Make a Fast Dynamic Language Interpreter

Not stated. From Compilers and interpreters.

A write-up of 21 optimizations that sped up a simple interpreter for the Zef language.

I rewrote PostHog's SQL parser, 70x faster, while barely looking at the code

Posted by robbie-c, with replies from many commenters. From Compilers and interpreters.

A Hacker News thread about a PostHog blog post on an AI-written, faster SQL parser.

Strategies for very fast Lexers

xnacly. From Compilers and interpreters.

A tutorial on techniques used to make the lexer of one hobby language fast.

Two studies in compiler optimisations

Henrique Cabral. From Compilers and interpreters.

A walkthrough of how LLVM optimises two small C++ functions, with source excerpts and exercises.

Bloom Filters

Sam Rose. From Databases and storage.

An interactive tutorial that explains how Bloom filters work and how to size them.

DuckDB Internals: Why is DuckDB Fast? (Part 1)

Kyle Cheung, Co-founder and CEO, Greybeam. From Databases and storage.

A vendor blog post explaining how DuckDB turns SQL into a plan and stores data.

SQLite performance tuning

Not stated in the text; the gist URL names phiresky. From Databases and storage.

A short gist listing SQLite settings for large databases with many readers.

Surprisingly Fast AI-Generated Kernels We Didn’t Mean to Publish (Yet)

Anne Ouyang, Azalia Mirhoseini and Percy Liang, Stanford CRFM. From Language models and training.

A Stanford CRFM post reporting fast GPU kernels written by language models.

8× faster binary search: from compiled code to mechanical sympathy

Itamar Turner-Trauring. From Systems and hardware.

A post showing how to speed up binary search by working with the CPU.

A Friendly Tour of Process Memory on Linux

0xkato. From Systems and hardware.

A guided tour of how Linux gives a program memory.

C Is Not a Low-level Language

David Chisnall. From Systems and hardware.

An essay arguing that C no longer matches how modern processors work.

Dataflow Architectures

Arvind and David E. Culler, MIT Laboratory for Computer Science. From Systems and hardware.

A 1986 survey of how dataflow computers store tokens and data structures.

Exploring Mach-O, Part 1

Gregory Anders. From Systems and hardware.

Part one of a series that builds a tiny ARM64 program and reads its header.

Girls Just Wanna Have Fast MPMC Queues with bounded waiting

Nahla. From Systems and hardware.

A design write-up of a bounded multi-producer multi-consumer queue in Rust, with benchmarks.

Pure Silicon Demo Coding: No CPU, No Memory, Just 4k Gates

Not stated. From Systems and hardware.

A write-up of two chip demos built for the Tiny Tapeout 8 competition.

The Nitty Gritty of “Hello World” on macOS

Joe Savage. From Systems and hardware.

A walkthrough of the Mach-O file format using a compiled Hello World program.

The Return of Rigorous Full-System Timing Simulation

Shanqing Lin, Mohammad Alian and Babak Falsafi, on the ACM SIGARCH blog. From Systems and hardware.

A blog post arguing that computer architects should measure full systems with statistically sound sampling.

ZX Spectrum: Experimenting With 1-Bit Sound

Michael Martin. From Systems and hardware.

A blog post recording attempts to play samples and chords through the ZX Spectrum beeper.