News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Zeroing local variables

Started by jj2007, April 02, 2022, 03:03:48 PM

Previous topic - Next topic

TimoVJL

AMD Ryzen 5 3400G with Radeon Vega Graphics     (SSE4)

20775   cycles for 100 * ClearLocals (fast+bloated)
21998   cycles for 100 * ClearLocals (slow+compact)
??      cycles for 100 * one nop
74      cycles for 100 * 10 nops
1733    cycles for 100 * 100 nops

18085   cycles for 100 * ClearLocals (fast+bloated)
22850   cycles for 100 * ClearLocals (slow+compact)
??      cycles for 100 * one nop
74      cycles for 100 * 10 nops
1731    cycles for 100 * 100 nops

18147   cycles for 100 * ClearLocals (fast+bloated)
21744   cycles for 100 * ClearLocals (slow+compact)
??      cycles for 100 * one nop
72      cycles for 100 * 10 nops
1736    cycles for 100 * 100 nops

19727   cycles for 100 * ClearLocals (fast+bloated)
20353   cycles for 100 * ClearLocals (slow+compact)
??      cycles for 100 * one nop
79      cycles for 100 * 10 nops
3249    cycles for 100 * 100 nops

51      bytes for ClearLocals (fast+bloated)
39      bytes for ClearLocals (slow+compact)
1       bytes for one nop
10      bytes for 10 nops
100     bytes for 100 nops
May the source be with you

daydreamer

It's good to know pad nops before innerloop don't take many clock cycles
But what about the 2,3,4,5,6,7,8,9 byte nops? Is there a difference between 9 single byte nops vs one 9byte nop (66h nop [eax*8+ebx+dword address] something)

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

jj2007

Good question, why don't you test it?