Aktív témák

  • P.H.

    senior tag

    A 32 bites non-temporal store-ok K8-as megvalósítása hagy némi kívánnivalót, a sima x86 tárolássorozat gyorsabb (VectorPath REP STOSD kizárt).

    @unpackSSE2:
    movnti [edi],eax
    add edi,04h
    add ebp,ecx
    jnz @unpackSSE2
    @unpckSSE2:
    add ebx,04h
    mov eax,edx
    mov ebp,[esi+ebx]
    jg @fenceUNPACK
    and eax,ebp
    and ebp,ecx
    jmp @unpackSSE2
    @@UNPACKBMP: <<- entry
    lea eax,{tömörített adatra mutató pointer}
    cmp dword ptr [eax],00h
    jz @exitUNPACK
    pushad
    mov edi,{célkép}
    mov esi,[eax]
    mov ecx,0FF000000h
    mov ebx,[esi-04h]
    lea esi,[esi+ebx-04h]
    neg ebx
    cmp {van_SSE2?},cl
    jnz @unpckSSE2
    jmp @unpck
    @unpack:
    mov [edi],eax
    add edi,04h
    add ebp,ecx
    jnz @unpack
    @unpck:
    add ebx,04h
    mov eax,edx
    mov ebp,[esi+ebx]
    jg @returnUNPACK
    and eax,ebp
    and ebp,ecx
    jmp @unpack
    @fenceUNPACK:
    sfence
    @returnUNPACK:
    popad
    @exitUNPACK:
    ret 00h

    8 megapixeles kép esetén:
    K8:
    - előkészített REP STOSD: 153M órajel
    - @unpackSSE2 (movnti [edi],eax): 68M órajel
    - @unpack (mov [edi],eax): 62M órajel
    Netburst (Prescott):
    - előkészített REP STOSD: 410M órajel
    - @unpackSSE2 (movnti [edi],eax): 110M órajel

    64 byte-os cache-line jutó 3-nál több ugró utasítás hatása elhanyagolható, a code-padding befolyása jelentősebb nála.

    kérdés: esetleges téves elágazásbecslés miatt lefutott sfence-eknek van teljesítményvisszafogó hatásuk, vagy el kell távolítani az ágat a critical path közeléből?

    [ Szerkesztve ]

    Arguing on the Internet is like running in the Special Olympics. Even if you win, you are still ... ˙˙˙ Real Eyes Realize Real Lies ˙˙˙

Aktív témák