3 ms·
For the average systems programmer, 90% of the really useful CPU information can be found in two places that change infrequently: - Agner Fog's instruction tab
by jandrewrogers 8y ago
For the average systems programmer, 90% of the really useful CPU information can be found in two places that change infrequently:
- Agner Fog's instruction tables for x86[1], which has the latency, pipeline, and ALU concurrency information for a wide range of instructions on various microarchitectures.
- Brief microarchitecture overviews (such as this one for Skylake[2]), that have block diagrams of how all the functional units, memory, and I/O for a CPU are connected. These only change every few years and the changes are marginal so it is easy to keep up.
Knowing the bandwidth (and number) of the connections between functional units and the latency/concurrency of various operations allows you to develop a pretty clear mental model of throughput limitations for a given bit of code. People that have been doing this for a long time can look at a chunk of C code and accurately estimate its real-world throughput without running it.
[1] https://www.agner.org/optimize/instruction_tables.pdf https://www.agner.org/optimize/instruction_tables.pdf
[2] https://en.wikichip.org/wiki/intel/microarchitectures/skylake_(server) https://en.wikichip.org/wiki/intel/microarchitectures/skylak...
- deepaksurti 8y agoDo we have similar resources for Discrete GPU's? I checked on wikichip, the GPU information is hard to come by or I am missing some Google fu. Thanks for sharing the above very useful resources, blocked my Saturday for first scan!