Hacker News new | ask | show | jobs
by DSMan195276 50 days ago
It all depends on the CPU architecture, if it supports something like out-of-order execution then both parts of the CPU could be in use at the same time to execute different instructions. Realistically any CPU with that level of complexity doesn't care about SUB vs XOR though.
2 comments

In an OoO CPU it won't even hit an execution unit because it's handled as a dependency chain break.
Also, because SUB is implemented internally with XOR, so it's normally the same gates, with different signals selecting a different function.