How much do register counts matter?

The other day I started thinking about registers for some reason (I need more exciting hobbies). How important are register counts to the performance of a machine? What would happen if you took architectural registers away from a modern PC? Various papers have looked into this in the past, but new processors have far more physical registers and deep rename buffers so I was curious how relevant it was today.

I had Claude prepare a write-up to see what the current state is. It uses gcc's -ffixed-<reg>, which permanently removes a register from the allocator's pool, to starve nine small kernels one register at a time, counting the spills and timing each build. While register count matters, there's definitely a point of diminishing returns, once your hot regions sit in registers there's not much left to gain.


This is another one of those areas where "ask the agent to mock this out for me" has dropped the activation energy low enough that I'm more likely to just try it out.

Read the full version Written by Claude.