This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Arfrever, christian.heimes, ncoghlan, neologix, pitrou, python-dev, serhiy.storchaka, vstinner
Date 2013-10-29.21:20:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383081605.76.0.828443567102.issue19183@psf.upfronthosting.co.za>
In-reply-to
Content
About memcpy(). Here is sample file. Compile it to assembler:

 gcc -O2 -S -masm=intel fnv.c

With memcpy() main loop is compiled to:

.L8:
    movzx   ecx, BYTE PTR [ebx+edx]
    imul    eax, eax, 1000003
    add edx, 1
    xor eax, ecx
    cmp edx, edi
    jne .L8

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
History
Date User Action Args
2013-10-29 21:21:45serhiy.storchakaunlinkissue19183 messages
2013-10-29 21:20:05serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, vstinner, christian.heimes, Arfrever, neologix, python-dev
2013-10-29 21:20:05serhiy.storchakasetmessageid: <1383081605.76.0.828443567102.issue19183@psf.upfronthosting.co.za>
2013-10-29 21:20:05serhiy.storchakalinkissue19183 messages
2013-10-29 21:20:05serhiy.storchakacreate