Skip to content

Instantly share code, notes, and snippets.

View quink-black's full-sized avatar

quink quink-black

View GitHub Profile
@quink-black
quink-black / asm-opt.md
Created December 29, 2024 06:39
From A to X: Infrastructure for Assembly Optimization

From libass, to dav1d, to FFmpeg, to x264, and perhaps more projects I haven't noticed, these projects have a lot of handwritten assembly optimization and use the same pattern to build the assembly optimization infrastructure. This article introduces the composition of this infrastructure from three stages: coding, runtime, and test and benchmark.

Most people don't need this infrastructure, but they can learn some good engineering practices. Even if doing mundane work, it's good to understand how the pyramid is built.

  1. Coding stage