I was wondering which piece of code is going to run faster since I want to optimize as much as possible.
code A:
if(((a & 0x0FFF) + (b & 0x0FFF)) & 0x1000 != 0)
{
Register.setHCarryFlag(true);
}
else
{
Register.setHCarryFlag(false);
}
code B:
Register.setHCarryFlag(((a & 0x0FFF) + (b & 0x0FFF))& 0x1000 != 0);
The reason I ask is I suspect that code B doesn't branch, but I don't know for sure how each is converted to machine code.
Better yet, is there a way to see the machine code that is produced from each piece of code?