News for hackers. Stuff that matters.
Re:Memcpy vs. memmove by danielweber on Monday December 01, 2014 @08:23PM (#8685178)
Do JMPs invalidate caches? That was the story I was telling myself where 12 NOPs would be faster than JMPing; I don't know if it's true.
Re:Memcpy vs. memmove by pbsd on Tuesday December 02, 2014 @09:55AM (#8687374)
I don't know what exactly you mean by that, but I'm going with no. Unconditional jumps do interact with the uops cache in recent Intel chips, but they do so by terminating the current uops cache line---which is generally desirable.
Re:Memcpy vs. memmove by jlebar on Monday December 01, 2014 @11:36PM (#8685739)
Loops can be implemented with JMPs, and it would be Very Bad if every iteration of a loop invalidated caches. (In fact, it would be Very Bad if just about anything common invalidated caches, given how important they are to modern CPU performance.)