For WizardStan's example:
mov $320,%eax
mul y
add x,%eax
vs
mov y,%eax
lea (%eax,%eax,4),%eax
shl $6,%eax
add x,%eax
Based on register availability, I might go with the latter. x86 mul is annoying since it needs EAX and EDX.
My latest project is trying to optimize this function in...