flat assembler
Message board for the users of flat assembler.
Index
> Main > register renaming cost |
| Author |
|
|
revolution 24 Sep 2026, 13:44
What cost is being measured? Compared to what? Because renaming can't be turned off to measure any difference between off or on.
With regard to "32" registers, that hasn't been valid for a long time. There are more than 200 registers in many CPU cores produced today. Renaming just picks a few out of the pool for each instruction. |
|||
|
|
sylware 24 Sep 2026, 14:02
Is this picking has a cost, namely will it cost extra cycles?
|
|||
|
|
revolution 24 Sep 2026, 14:28
There are no extra cycles for register allocation, because there is no way to turn it off to compare.
If it takes 100 cycle to allocate a register then that is just how the CPU works. There isn't an alternative path that doesn't do register renaming. Overall, register renaming is a win (it has many advantages), or otherwise the makers would kill it and boast everywhere how they made the CPU "faster". |
|||
|
|
sylware 24 Sep 2026, 15:10
I could code in a way to reduce register renaming pressure. That's why I did ask if there is a cost as extra cycles.
So you say there is none of those extra cycles on modern micro-architectures. Good! |
|||
|
|
revolution 24 Sep 2026, 15:21
There aren't any "extra" cycles.
Any cycles taken to pick a register are just how it works. The pipeline might have zero, one, two or a million cycles for the renaming stage. But those aren't "extra" cycles, they are normal cycles. There isn't a way to avoid it. All code is stuck with it. There isn't a way to "code in a way to reduce register renaming pressure" because all code passes through the renaming stage(s).* * Maybe "nop" is special and can bypass some stages or something, IDK, but nop doesn't do anything that can affect the state of the register set. |
|||
|
|
sylware 26 Sep 2026, 10:14
Ok. So register renaming is "always" (i.e. with enough testing) there and has a static cost.
|
|||
|
|
revolution 26 Sep 2026, 11:29
sylware wrote: Ok. So register renaming is "always" (i.e. with enough testing) there and has a static cost. So far, as of today, there is no variable number of cycles where some instructions use X cycles, and others use Y. Perhaps tomorrow a new architecture comes out that changes that? |
|||
|
|
Furs 26 Sep 2026, 22:28
revolution wrote: So far, as of today, there is no variable number of cycles where some instructions use X cycles, and others use Y. Perhaps tomorrow a new architecture comes out that changes that? |
|||
|
|
revolution 27 Sep 2026, 03:21
Furs wrote:
|
|||
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2026, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.