News:

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

Main Menu

Help with QueryPerformanceCounter and 64 bit numbers

Started by Lonewolff, April 12, 2018, 03:15:46 PM

Previous topic - Next topic

daydreamer

Quote from: jj2007 on May 18, 2018, 10:14:54 AM
Quote from: LordAdef on May 18, 2018, 07:49:34 AMBut aligning is so simple that I don't mind doing it anyway

If the code gets any faster with alignment, it makes sense in an innermost loop with a Million iterations. Otherwise it bloats your exe, pollutes the data cache, and thus may slow down the whole program.
Thanks for macro jj
Thanks for a timing test idea:
Align 16 data with sse code,so you easily can use mulps,divps etc with variables in memory
Vs you are forced to not be able to use memory aligned data with simd,so instead you use lots of movups before innerloop and innerloop makes use of all 16 xmm regs in 64bit mode for all mulps etc is reg to reg,all variables are kept in .xmm regs
And testrun this several million times
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

Note that your testcase is different: fld alignedVariable vs fld unalignedVariable uses identical instructions. When using SIMD instructions that throw exceptions, you need additional instructions, and that may cost cycles, of course. Test it... GetTickCount is your friend ;)

daydreamer

Quote from: jj2007 on May 18, 2018, 09:48:28 PM
Note that your testcase is different: fld alignedVariable vs fld unalignedVariable uses identical instructions. When using SIMD instructions that throw exceptions, you need additional instructions, and that may cost cycles, of course. Test it... GetTickCount is your friend ;)
my C++ exercise, force me into use movups and mulps xmmreg,xmmreg,inline asm,so I could as well try that different solution for innerloop
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