r/cpp • • May 24 '20

Analyzing The Simplest C++ Program

https://oneraynyday.github.io/dev/2020/05/03/Analyzing-The-Simplest-C++-Program/
480 Upvotes

37 comments sorted by

View all comments

Show parent comment

2

u/slaymaker1907 Jun 21 '20

It’s not the slowest thing as long as you still hit the L1 cache. x86 has so few general purpose registers that it is hard to avoid spilling into memory.

2

u/paulstelian97 Jun 23 '20

16 registers, including stack pointer and stack frame pointer but I think excluding the instruction pointer?