C++相談室 part28
■ このスレッドは過去ログ倉庫に格納されています
0826デフォルトの名無しさん
NGNG間違ってないと思いますよ。
以下VS.net2003での最適化無しの場合です。
アセンブラ読めなくてもなんとなくわかってもらえるかと。
void test(int& a)
{
printf("a:%d", a);
}
mov eax,dword ptr [a]
mov ecx,dword ptr [eax]
push ecx
push offset string "a:%d"
call _printf
add esp,8
void test(int a)
{
printf("a:%d", a);
}
mov eax,dword ptr [a]
push eax
push offset string "a:%d"
call _printf
add esp,8
■ このスレッドは過去ログ倉庫に格納されています