Skip to content
Tcl Source Code History Of Ticket 625454ffff
Login

History Of Ticket 625454ffff

Artifacts Associated With Ticket 625454ffff

  1. Ticket change [d31c97e6a0] (rid 113640) by davidw on 2002-10-18 23:13:25:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      [ I hate the brevity of the summary field ]
      
      Hi,
      
      While running some testing code that I wanted to time,
      it came up as a requirement that users want to run it
      not by number of iterations, but by a certain length of
      time.
      
      The idea occurred to me that [time] could take an
      additional argument - a qualifier stating that
      iterations is a number of seconds (I suppose you could
      also use 'minutes' or 'hours' for the additional arg if
      you wanted).
      
      The loop would then run for at least, but not
      precisely, that amount of time, and return the amount
      of microseconds per iteration.
      
      It would also be possible to script the whole thing, of
      course.  Maybe that's a better course of action?  The
      nice thing about time is that the loop overhead is
      minimal.  Having it coded in C would mean that the
      results would be comparable to regular [time] results.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "davidw"
    9. subsystem initialized to: "18. Commands M-Z"
    10. title initialized to: "new arg to 'time' - iterations in secs"
    11. type initialized to: "RFE"
  2. Ticket change [48019fa82e] (rid 99809) by dkf on 2003-03-10 04:53:17:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      One problem with this.  How to go about calibrating so that
      the time-reading code is not called very often, as reading
      the time is a fairly expensive operation (i.e. at least one
      syscall.)  Techniques that would work well for slow chunks
      of code will be poor for fast chunks, and vice versa...
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [623e72216a] (rid 92381) by dkf on 2003-03-10 18:12:48:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      One possible technique is to use exponential growth of
      numbers of iterations per clock measurement until such time
      as the uncertainty in the measurement drops low enough for a
      reasonable estimate in the number of times to run the code
      to be made (or the total allotted time is exceeded.)  The
      problem with this is that to estimate the uncertainty you
      need to know the accuracy of the platform's clock... :^/
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Add attachment "cps.tcl" [dd702fbad3] (rid 114669) by dkf on 2009-07-14 17:50:30.

  5. Ticket change [99c97d511f] (rid 110850) by dkf on 2009-07-14 17:50:31:

    1. icomment:
      
      
      File Added - 334999: cps.tcl
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  6. Ticket change [4eb05dd196] (rid 125684) by dkf on 2009-07-14 17:53:19:

    1. icomment:
      I've attached a file that comes from some the TclOO benchmarking suite. It tries *very* hard to get a stable set of performance figures, since it is aimed at timing very fast code (method calls originally).
      
      If this (or simple adaptations of it) is suitable for the purposes requested, it's perhaps worth putting in tcllib.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. resolution changed to: "Later"
    5. username: "dkf"
  7. Ticket change [4c102d0c6c] (rid 261544) by serhiy.storchaka on 2026-11-13 11:18:45:

    1. closedate changed to: "2461357.9713335303"
    2. closer changed to: "serhiy.storchaka"
    3. icomment:
      Implemented as the timerate command (TIP 527): timerate script ?time? runs the script for the given number of milliseconds and calibrates out the measurement overhead. It is available in Tcl 9.0, and as tcl::unsupported::timerate since Tcl 8.6.10.
      
    4. login: "serhiy.storchaka"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"