A collection of microbenchmarks demonstrating low-level concepts and optimisations that affect performance on modern x86 CPUs.
 Each demonstration ex

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-04-25 09:30:07

A collection of microbenchmarks demonstrating low-level concepts and optimisations that affect performance on modern x86 CPUs. Each demonstration examines a single concept in isolation to make learning easier.

If you are new to the world of CPU architecture and microarchitecture, you may want to read Primer.md, which covers some basic concepts that are prerequisite knowledge for many of the demonstrations.

Some demonstrations inherently build on topics discussed in other demonstrations. You may want to try the demonstrations in this order to minimise confusion:

Naturally, the exact results of microbenchmarks depend significantly on your CPU's microarchitecture - demonstrating microarchitecture in a microarchitecture-agnostic manner is difficult. Some factors that may contribute to differing results include:

The demonstrations were written and tested with Intel x86-64 CPUs from Skylake onwards in mind. I have tried my best to indicate in each demonstration broadly which CPUs are supported and what assumptions are made.

Leave a Comment