1 hour ago · Tech · hide

I wanted to know how big the return address stack (RAS, Intel calls it the RSB) is on my laptop. It’s an i7-12700H, so it has two kinds of cores: Golden Cove P-cores (cpus 0-11) and Gracemont E-cores (cpus 12-19). Intel doesn’t really publish these numbers anymore for newer cores, so the only way is to measure it. The RAS is a small stack inside the branch predictor. Every call pushes the return address onto it and every ret pops it to guess where it is going back to. If you go deeper than the stack is, the oldest entries get overwritten, and on the way back up those returns get mispredicted. So the idea is simple: nest calls deeper and deeper and look for where ret suddenly gets slow.

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town