News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

mov [reg32], 0 or and [reg32], 0?

Started by jj2007, May 14, 2011, 07:43:54 AM

Previous topic - Next topic

hutch--

You will probably find that at the bit level a copy bit occurs at about the same speed as a modify bit so if the source is an immediate in both, they should take a similar amount of time if they have similar circuitry in hardware.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

azdps

Intel(R) Atom(TM) CPU N475   @ 1.83GHz (SSE4)
430     cycles for 100*mov, loop
424     cycles for 100*and, loop
412     cycles for 100*mov, REP
407     cycles for 100*and, REP

424     cycles for 100*mov, loop
424     cycles for 100*and, loop
410     cycles for 100*mov, REP
411     cycles for 100*and, REP


Rockoon

AMD Phenom(tm) II X6 1055T Processor (SSE3)
308     cycles for 100*mov, loop
208     cycles for 100*and, loop
88      cycles for 100*mov, REP
146     cycles for 100*and, REP
696     cycles for 100*inc, loop
695     cycles for 100*inc, REP

207     cycles for 100*mov, loop
307     cycles for 100*and, loop
88      cycles for 100*mov, REP
146     cycles for 100*and, REP
695     cycles for 100*inc, loop
695     cycles for 100*inc, REP
When C++ compilers can be coerced to emit rcl and rcr, I *might* consider using one.