flat assembler
Message board for the users of flat assembler.
Index
> Windows > timing functions Goto page Previous 1, 2 |
Author |
|
nmake 15 Dec 2012, 15:21
I made a third sample, with 10 different ways of dividing a number by 2 and comparing the speeds in a graph.
|
|||||||||||
15 Dec 2012, 15:21 |
|
typedef 15 Dec 2012, 18:42
doesn't work on Win7(x64, Ultimate)
|
|||
15 Dec 2012, 18:42 |
|
nmake 15 Dec 2012, 19:20
what happens?
|
|||
15 Dec 2012, 19:20 |
|
typedef 15 Dec 2012, 19:35
Nothing. Probably an exception somewhere. Don't have time to debug it.
I double click it and nothing happens. |
|||
15 Dec 2012, 19:35 |
|
mindcooler 15 Dec 2012, 19:55
Requires SSE4.
|
|||
15 Dec 2012, 19:55 |
|
nmake 15 Dec 2012, 19:56
The example requires SSE4, but the library does not. If you don't have SSE4 then that might be it.
If you download the library you can customize many things in the source file. |
|||
15 Dec 2012, 19:56 |
|
typedef 15 Dec 2012, 20:53
Hmm. I wanted to make sure. I used this little nifty tool(http://www.cpuid.com/).
I have up to 3S. |
|||
15 Dec 2012, 20:53 |
|
nmake 15 Dec 2012, 20:56
Isn't that annoying
I guess I have to implement cpuid for sse now too. That will be my next task. Last edited by nmake on 15 Dec 2012, 20:57; edited 1 time in total |
|||
15 Dec 2012, 20:56 |
|
typedef 15 Dec 2012, 20:57
^^Well you can always make a backward compatibility hack.
|
|||
15 Dec 2012, 20:57 |
|
nmake 16 Dec 2012, 07:02
In case you wonder what it would look like if you had sse4, I bought this cpu this summer btw. Overclock-wise I regret the deal, feature-wise I love the choice I made considering it supports the new random instruction on chip, avx, aes and the low die size.
|
|||
16 Dec 2012, 07:02 |
|
Fred 19 Dec 2012, 13:43
Hm, I'll have to try this. Can it time 64 bit code?
|
|||
19 Dec 2012, 13:43 |
|
nmake 19 Dec 2012, 14:10
Well, I did test on a 64 bit windows 7 machine and it worked, but of course that might not be the case for everyone.
If you time functions up against each other, remember to do warmup of the functions before testing so the function have a chance to cache, or else the time may vary a bit. Like this for example: Code: rept 10 { stdcall function1 } ; Prefetch before timing invoke start_timing,0 ; Start timing stdcall function1 ; function call invoke stop_ticks,FALSE ; Stop timing The rept 10 will warmup and cache the function I want to time. If you do not warmup, the closest function that is positioned closest to start_timing might be cached along with the code that starts the timing, and function 2 might not be within that cacheline, and they will differ. Cache both before timing. |
|||
19 Dec 2012, 14:10 |
|
typedef 19 Dec 2012, 16:12
Can these (SSE4) be found under virtualization ? Or do the Virtual Machines actually rely on the machine itself to emulate so?
I think that'd be pretty cool. |
|||
19 Dec 2012, 16:12 |
|
Madis731 20 Dec 2012, 08:25
Actually it really doesn't matter much if you used:
Code: proc div2_2 num ; shr [num],1 mov eax,[num] shr eax,1 ret endp or Code: proc div2_2 num ; shr [num],1 mov eax,[num] shr eax,1 ; times 10 shr eax,1 doesn't work, I think I found a bug in FASM 1.70.02 shr eax,1 ; anyone cares to test that in newer versions? shr eax,1 ; times 10 ror eax,1 does work shr eax,1 shr eax,1 shr eax,1 shr eax,1 shr eax,1 shr eax,1 shr eax,1 ret endp when benchmarking because the call/ret overhead is so great that the tiny shr has only marginal effect. Btw, the graphics look very nice. I love visual stuff. |
|||
20 Dec 2012, 08:25 |
|
nmake 20 Dec 2012, 08:58
Thanks, it is simple GDI, brush and pens (Source code is in first page at the bottom of this thread)
|
|||
20 Dec 2012, 08:58 |
|
revolution 20 Dec 2012, 09:50
Madis731 wrote: times 10 shr eax,1 doesn't work edit: forgot to mention that you can fix it with a colon: Code: times 10: shr eax,1 |
|||
20 Dec 2012, 09:50 |
|
Madis731 20 Dec 2012, 11:06
revolution wrote: The expression calculator is greedy.... I guessed it was something along that line. revolution wrote: you can fix it with a colon Indeed I can, thanks! |
|||
20 Dec 2012, 11:06 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.