Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default How can I monitor CPU time of algorithm I developed in Excel vba?

I am comparing different algorithms on a problem. I developed them in
Excel vba. How can I record the CPU time of these algorithms?

thanks!
Jerry

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 418
Default How can I monitor CPU time of algorithm I developed in Excel vba?

Jerry wrote:
I am comparing different algorithms on a problem. I developed them in
Excel vba. How can I record the CPU time of these algorithms?


See http://support.microsoft.com/kb/q172338 . Note that the VBA
Timer() function might behave differently between Microsoft Windows and
a Macintosh, according to VBA help. On my MS Win XP Pro SP2 system,
Timer() has the same resolution as GetTickCount(). Also note that
there are many complex factors to consider when interpreting the timing
results, regardless of what function you choose to use. To mention a
couple: (1) the overhead of the timer function relative to the code to
be measured; and (2) extraneous CPU overhead due to interrupts and
higher-priority processes running during the timing interval. To get a
feel for those factors, try implementing the resolution loops similar
to those described in the aforementioned KB. Execute the sub 10 or
more times and note the variation in the loop count, and less so in the
resolution.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 418
Default How can I monitor CPU time of algorithm I developed in Excel vba?

PS....

I wrote:
On my MS Win XP Pro SP2 system,
Timer() has the same resolution as GetTickCount().


That was not intended to be a recommendation. If you do the resolution
tests, you might also notice that Timer() has significantly more
overhead then GetTickCount(). At least, that seems self-evident on my
MS Win XP Pro SP2 system with a 2.13 GHz Pentium CPU (single core).

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determining current Time Zone In Excel Shaun_C Excel Discussion (Misc queries) 2 April 7th 06 06:29 PM
cumulative time in excel Lerxst Excel Discussion (Misc queries) 4 March 28th 06 08:59 PM
Excel Used as a Time Sheet emanna Excel Discussion (Misc queries) 6 March 2nd 06 05:25 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Accumulate weekly time to total time in Excel. delve Excel Discussion (Misc queries) 0 May 4th 05 08:14 PM


All times are GMT +1. The time now is 07:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"