Re: [AD] Add timeBeginPeriod(1) to wtimer.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> i looked at the src code, to find out about the WaitForSingleObject()
> 
> how do you measure the results ?

I let my program run and look at what the task manager tells me (resp.
process explorer), then I compare that to my internal cpu measurement, which
I do using a timer on 1ms resolution. Using the current allegro both
measurements differ, and with my mod the measurements are almost equal. 


> lets presume for a moment that the theory about the kernel running more 
> often to check on this thing is going to cost CPU cycles, what if it 
> does!  i mean is the .001% really going to matter ?
> 
> now lets presume the WaitForSingleObject() gets checked whenever the CPU
> is ready to check it, it will get done when it gets done.  which is how 
> i think it actaully works.  if i request 1ms resolution, i *mean* i want
> 1ms resolution.  not some random number between 6 and 12ms.
> 
> does the continual calling of timeBeginPeriod()/End() going to cost more 
> than just setting it once, and leaving it ?
> 
> how varied is your performance when using this mod ?

The difference between only modifying rest() and putting a call to
timeBeginPeriod(1) into allegro_init or install_timers() is significant, I
do not talk about 1% or less here. Depending on the actual HW it changes
5%-10% into 50%+. 

My main source of difficulty in understanding really what exactly slows down
and why is, that all this seems to be quite different on different HW. I'm
using 3 different PCs, and they all behave quite differently. The only one
common result is that CPU usage goes down with my mod... 

> i set it in my main(), and leave it set.
> 
> aj.

best regards 
tobing 




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/