P
Wenn ich richtig interpretiere brauct dein Einzeiler in der release Version
5 Befehle mehr als die lesbarere Variante MSVC 6.0 Releas Optimize speed
?my_strcpy@@YAXPADPBD@Z PROC NEAR ; my_strcpy, COMDAT
; 152 : while(*to++ = *from++);
* mov edx, DWORD PTR _from$[esp-4]
* mov ecx, DWORD PTR _to$[esp-4]
inc ecx
* mov al, BYTE PTR [edx]
inc edx
* mov BYTE PTR [ecx-1], al
test al, al
je SHORT $L50064
$L50063:
* mov al, BYTE PTR [edx]
mov BYTE PTR [ecx], al
* inc ecx
* inc edx
* test al, al
* jne SHORT $L50063
$L50064:
; 153 : }
ret 0
?my_strcpy@@YAXPADPBD@Z ENDP ; my_strcpy
?my_strcpy2@@YAXPADPBD@Z PROC NEAR ; my_strcpy2, COMDAT
; 158 : do
; 159 : {
; 160 : *to++ = *from;
* mov eax, DWORD PTR _from$[esp-4]
* mov ecx, DWORD PTR _to$[esp-4]
$L50069:
* mov dl, BYTE PTR [eax]
* mov BYTE PTR [ecx], dl
; 161 : } while(0 != *from++);
* mov dl, BYTE PTR [eax]
* inc ecx
* inc eax
* test dl, dl
* jne SHORT $L50069
; 162 : }
ret 0
?my_strcpy2@@YAXPADPBD@Z ENDP ; my_strcpy2
brauchbar ?