2 ms·
That's not necessarily true. Many modern CPUs have uop caches, and it's reasonable to assume implementations will eliminate NOPs before placing lines in the uop
by sweetjuly 1y ago
That's not necessarily true. Many modern CPUs have uop caches, and it's reasonable to assume implementations will eliminate NOPs before placing lines in the uop cache. A hit on the uop cache loses any slowdown you hoped to achieve since now the NOPs are neither fetched nor decoded.
- tux3 1y agoThat's an interesting question, because the uop cache is filled early in the pipeline, but zero-idioms are only detected around the rename stage. They might be able to skip a plain 0x90, but something like mov rax, rax would still emit a uop for the cache, before being eliminated later in rename. So at best it would be a fairly limited optimization. It's also nice because rename is a very predictable choke point, no matter what the rest of the frontend and the backend are busy doing.
- sitkack 1y agoInstead of arguing about it, you people could have run an experiment and written a paper.