Originally Posted by
Kuntantee
My dear, function inlining and pipelining are two completely different concepts. They are not even remotely related and frankly, inlining is irrelevant to this discussion. Moving on, you are assuming your values are stored in two registers, how did you load those values to registers? There are at least two additional load instruction there. Also, I have no access to the design document of some main stream CPU, I don't know how their algorithms are functioning and how they are pipelining, etc. But as a general rule of thumb, same operators in a sequential manner are not pipelinable, branches are strictly NOT pipelinable, unless predicted and the assembly code is reconfigured. You have a (missing) branch instruction in your code (after CMP).