• Confused about avx and sse2 performance

    From Branimir Maksimovic@branimir.maksimovic@nospicedham.gmail.com to comp.lang.asm.x86 on Thu May 27 20:03:12 2021
    From Newsgroup: comp.lang.asm.x86

    Can someone explain to me why is this faster: https://github.com/bmaxa/shootout/blob/main/nbody/nbodysse2.asm
    then this:
    https://github.com/bmaxa/shootout/blob/main/nbody/nbody2.asm

    also can someone run to see if this is quirk with my cpu (Zen1).
    you need fasm, compile with fasm and
    then gcc.
    [code]
    ~/shootout/nbody >>> fasm nbody2.asm -#[ruA][main]
    flat assembler version 1.73.27 (16384 kilobytes memory)
    4 passes, 10432 bytes.
    ~/shootout/nbody >>> gcc nbody2.o -o nbody2 -no-pie -#[ruA][main]
    ~/shootout/nbody >>>
    [/code]

    Thanks!
    --
    current job title: senior software engineer
    skills: x86 aasembler,c++,c,rust,go,nim,haskell...

    press any key to continue or any other to quit...

    --- Synchronet 3.21d-Linux NewsLink 1.2