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.
- Coding stage