+ Reply to Thread
Results 1 to 5 of 5

calculate processing time

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    calculate processing time

    Hello. How do I calculate processing time in excel to compare which approach is more effecient?

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Re: calculate processing time


    Hi !

    As here it's a VBA forum, use VBA Timer function …

  3. #3
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: calculate processing time

    Quote Originally Posted by ammartino44 View Post
    How do I calculate processing time in excel to compare which approach is more effecient?
    There are two common approaches; see below.

    But they only solve the problem of physically measuring time. The greater problem is how to interpret the results.

    Beware of the situation where much of what you measure is VBA and system overhead and the overhead of the communication between the VBA and Excel threads.

    -----

    If the operations take several seconds and you don't mind that time is measured in increments of 15.625 millisecond (albeit accurate to the microsecond), the following is the simplest paradigm.
    Please Login or Register  to view this content.
    "Whatever you want to measure" might be Range(...).Calculate or the equivalent. You should decide whether you want to do disable ScreenUpdating and EnableEvents and to enable Manual calculation, or if that overhead is part of what you want to measure.

    Note: st and et are type Single because Timer is type Single. We use type Single instead of type Double arithmetic in order to minimize arithmetic side-effects that creates the illusion that the elapsed time is not be a multiple of 15.625 msec.

    If the operations take less than several seconds or you want finer resolution (which varies from computer to computer; about 297 nanoseconds on mine), you could use the following paradigm.
    Please Login or Register  to view this content.
    AFAIK, neither approach works on a Mac.
    Last edited by joeu2004; 08-10-2015 at 07:27 PM. Reason: cosmetic

  4. #4
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: calculate processing time

    What do you mean between the vba and the excel threads? I'm just trying to measure how long a calculation takes. For example, using one type of formula (for a huge data set) vs. using a different type of formula.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: calculate processing time

    There's a workbook that times formulas at https://app.box.com/s/b5ykwwa9x6xs8d7v9vhv
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. average processing time
    By williampr43 in forum Excel General
    Replies: 0
    Last Post: 02-17-2015, 01:24 PM
  2. Macro Processing Time
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-28-2015, 01:44 PM
  3. Sheet-related processing causes Excel VBA Userform to stop processing Tab/Enter
    By Joaquin M Lopez Muno in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-22-2014, 03:02 PM
  4. Reduce processing time for processing multiple excel sheets
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 09:25 AM
  5. Worrying too much about processing time?
    By ShawnW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2013, 01:22 PM
  6. Macro which delays for processing time
    By freud1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-05-2012, 07:04 AM
  7. Calculate processing time with fixed time paramaters
    By Apel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2009, 08:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1