2 ms·
Here's an incredibly minimalistic example: int f(double x, int y) { return x * y; } int g(int x, int y) { return x * y; } The
by Joker_vD 2y ago
Here's an incredibly minimalistic example:
int f(double x, int y) {
return x * y;
}
int g(int x, int y) {
return x * y;
}
These two functions differ by a single token, yet their assembly translations have only one common instruction, and this instruction is "ret":
f:
movapd xmm1, xmm0
pxor xmm0, xmm0
cvtsi2sd xmm0, edi
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
ret
g:
mov eax, edi
imul eax, esi
ret