Get the latest tech news

Performance Debugging with LLVM-mca: Simulating the CPU


We debug our performance problem by simulating it with llvm-mca!

Some time ago I had a performance problem that wasn’t easy to explain by just looking at the code, since the version I expected to be faster was actually slower. The documentation is sparse on exact meaning of these numbers, but a reasonable guess would be that there were cycles when there was both a pressure because of busy execution ports and instruction dependencies. Nevertheless, the tool is very useful in the utility box of a performance engineer and I would highly recommend anyone working with vectorization and compiler intrinsics or assembly to get familiar with it.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of cpu

cpu

Photo of mca

mca

Related news:

News photo

I made my VM think it has a CPU fan

News photo

We ran a Unix-like OS on our home-built CPU with a home-built C compiler (2020)

News photo

CPU-Based Layout Design for Picker-to-Parts Pallet Warehouses