AMD vs Intel timing on this code...

From: Alex McDonald (alex_mcd_at_btopenworld.com)
Date: 01/12/04

  • Next message: Randall Hyde: "Re: Syntax highlighting for assembly language"
    Date: Mon, 12 Jan 2004 13:59:25 +0000 (UTC)
    
    

    On my ADM XP, the following

      mov eax, [esi]
      add esi, 4
      jmp [eax]

    appears to execute around the same speed as

      lodsd
      jmp [eax]

    Which is faster on Intel (586 and above, 486 and below are of no
    interest)?

    The AMD docs has vectorpath 4 cycles for lodsd, and 4+4 directpath for
    the mov(mem)+add(imm). But I'm seeing the same results (without using
    RDSTC, just a very large number of iterations, 1billion+). What's
    causing the slowdown? I would have thought lodsd was slower than the
    equivalent directpath instructions. Is it a dependency on ESI?

    Any faster way of writing this?

    -- 
    Regards
    Alex McDonald
    

  • Next message: Randall Hyde: "Re: Syntax highlighting for assembly language"