flat assembler
Message board for the users of flat assembler.
Index
> Windows > performing simple time measurements? EDIT: I got it |
Author |
|
windwakr 26 Feb 2010, 20:45
First, I've been working on a Mandelbrot explorer for the past day or two. I used Alphonso's little graphical demo as a base for GDI drawing.
Inside the attachment are my two versions of my code. One nonthreaded, and one that I just tried making threaded. The threaded one seems to be quite a bit faster, but any time I try to measure the codes using gettickcount(making sure to do one for each thread on the threaded one), it returns roughly the same numbers that the nonthreaded one does. That can't be right. How would I go about timing this properly? And please forgive me for the horrible, uncommented, unoptimized code. I just wanted it to work, and didn't care how. EDIT: Controls are up,down,left,right,z,x,shift,control,and space. Just play around with them.
Last edited by windwakr on 26 Feb 2010, 21:36; edited 1 time in total |
|||||||||||
26 Feb 2010, 20:45 |
|
revolution 26 Feb 2010, 21:00
windwakr wrote: ... using gettickcount ... |
|||
26 Feb 2010, 21:00 |
|
windwakr 26 Feb 2010, 21:02
Well, I removed them.
It didn't seem to be working. |
|||
26 Feb 2010, 21:02 |
|
revolution 26 Feb 2010, 21:16
So how can we point out the error if you don't post the code that was causing the problem?
|
|||
26 Feb 2010, 21:16 |
|
windwakr 26 Feb 2010, 21:28
Wait a second, I forgot it's threaded. I was adding up the execution time of EACH thread.
So would it be accurate to check the time before I start the threads, and then after they're done? Attachment on this post has what I think would be more accurate. I'm not looking for super-accurate timing, just good enough to see the differences between threaded and not. EDIT: Yeah, this seems about right.
Last edited by windwakr on 26 Feb 2010, 23:04; edited 1 time in total |
|||||||||||
26 Feb 2010, 21:28 |
|
revolution 26 Feb 2010, 21:45
You have hardcoded your threads. What happens if you want to extend it to 8 threads? Will you make 6 more copies of the thread handling code?
|
|||
26 Feb 2010, 21:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.