←back to thread

125 points todsacerdoti | 3 comments | | HN request time: 0s | source
Show context
gwd ◴[] No.45038833[source]
Kind of weird that NOP actually slows down the pipeline, as I'd think that would be the easiest thing to optimize out of the pipeline, unless instruction fetch is one of the main limiting factors. Is it architecturally defined that NOP will slow down execution?
replies(5): >>45039006 #>>45039234 #>>45039381 #>>45039410 #>>45039488 #
1. IcePic ◴[] No.45039006[source]
I think so, as in "make sure all other stuff has run before calling the NOP finished". Otherwise, it would just skip past it and it would have no effect if placed in a loop, so it would be eating memory for no use at all.
replies(2): >>45039160 #>>45039320 #
2. bob1029 ◴[] No.45039160[source]
Eating memory alone may have the desired effect. The memory bandwidth of a cpu is not infinite.
3. motorest ◴[] No.45039320[source]
> I think so, as in "make sure all other stuff has run before calling the NOP finished".

Is this related to speculative execution? The high level description sounds like NOP works as sync points.