Message201677
About memcpy(). Here is sample file. Compile it to assembler:
gcc -O2 -S -masm=intel fnv.c
With memcpy() main loop is compiled to:
.L3:
mov esi, DWORD PTR [ebx]
imul eax, eax, 1000003
add ebx, 4
xor eax, esi
sub ecx, 1
mov DWORD PTR [esp+24], esi
jne .L3
With per-byte copy it is compiled to:
.L3:
mov dl, BYTE PTR [ecx]
imul eax, eax, 1000003
sub ebp, 1
movzx ebx, BYTE PTR [ecx+1]
movzx edi, BYTE PTR [ecx+2]
movzx esi, BYTE PTR [ecx+3]
add ecx, 4
mov dh, bl
sal edi, 16
movzx edx, dx
sal esi, 24
or edx, edi
or edx, esi
xor eax, edx
cmp ebp, -1
jne .L3 |
|
Date |
User |
Action |
Args |
2013-10-29 21:22:12 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, neologix, python-dev |
2013-10-29 21:22:12 | serhiy.storchaka | set | messageid: <1383081732.92.0.968618829095.issue19183@psf.upfronthosting.co.za> |
2013-10-29 21:22:12 | serhiy.storchaka | link | issue19183 messages |
2013-10-29 21:22:12 | serhiy.storchaka | create | |
|