RE: Re[4]: [GD-Windows] Performance timing
Brought to you by:
vexxed72
From: Donavon K. <DKe...@io...> - 2004-02-11 17:09:38
|
(To be more precise, it does a fixed-point multiply and shift to convert the count to milliseconds.) -----Original Message----- From: Donavon Keithley Sent: Wednesday, February 11, 2004 11:02 AM To: 'gam...@li...' Subject: RE: Re[4]: [GD-Windows] Performance timing GetTickCount is just a tiny function that reads a variable that's incremented in the system timer interrupt handler. In situations where this timer is useful, the extra speed is insignificant. -----Original Message----- From: Carl Bevil [mailto:car...@ya...] Sent: Tuesday, February 10, 2004 7:27 PM To: Simon O'Connor Subject: Re[4]: [GD-Windows] Performance timing Did that, and they have a nice utility that performs some timing tests on your machine and spits out a report (it's at http://developer.nvidia.com/object/timer_function_performance.html). The report had interesting results: ----- QueryPerformanceFrequency() freq = 0 2593560000 method 0: QueryPerfCntr..() 10000 times tot: 0 6720740 avg: 672.074000 avg time: 2.59132e-007 method 1: GetTickCount() 10000 times tot: 0 260708 avg: 26.070800 avg time: 1.00521e-008 method 2: TimeGetTime() 10000 times tot: 0 1420712 avg: 142.071200 avg time: 5.47785e-008 method 3: Pentium internal high-freq cntr() 10000 times tot: 0 840856 avg: 84.085600 avg time: 3.24209e-008 ----- I've left out the data for less than 10,000 iterations for sake of length; the averages were similar for these cases (and I ran the test a couple times with similar results). It looks like GetTickCount is the fastest, at least for this test setup on my machine. Am I reading the results wrong? I would have expected RDTSC to be the fastest. What could this mean? Is this because of the cache effects that Jon mentioned? Just curious. :-) Tbanks! Carl ------------------------------------------ Tuesday, February 10, 2004, 4:44:01 PM, you wrote: > Hi Carl, > Have a search around nVidia's developer website > (http://developer.nvidia.com), IIRC they did presentation surveying each of > the major timing methods with regard to using them to profile code and the > advantages and disadvantages plus latencies of each. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=555 |