Loading ...
Sorry, an error occurred while loading the content.

Re: Clip Optimization

Expand Messages
  • ebbtidalflats
    ... The one great advantage of labels over SKIPs is that you can change the code after the branch without having to change the skip size. As to timing a clip s
    Message 1 of 3 , Sep 10, 2009
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "silvermoonwoman2001" <silvermoonwoman@...> wrote:
      >
      > --- In ntb-clips@yahoogroups.com, Art Kocsis <artkns@> wrote:
      > >
      > > In coding for processing very large files I got to wondering
      > > about clip performance optimization. Since there are usually
      > > different ways to accomplish the same function I would expect
      > > some to be faster or more memory efficient than others.
      >
      > You can put some variables in your clip to maintain start time and end time, and benchmark/compare various alternatives.
      >
      > In my experience, a series of ^!Replace alls is usually faster than a loop. Loop performance is generally improved by using ^!SetScreenUpdate off.
      >
      > I've never really worried about the efficiency of label names vs Skip's


      The one great advantage of labels over SKIPs is that you can change the code after the branch without having to change the skip size.


      As to timing a clip's execution, because of a lack of time math (down to seconds) in NoteTab, and the smallest unit of time the date function can return is a second, you must have many iterations in a loop to note any differences in time. Even complicated code usually runs in MILLIseconds.

      Basically you want to capture the current time to a variable, run the clip, at its end capture the time again, then subtract the first time from the last to get the duration. This was discussed in this forum a number of years back - search the archives for "Hargrove" and/or "Raine" (I incorporated their ideas into my own utility for timing execution).

      If you can't find their posts, and want some way to time execution, contact me by private email.


      Cheers



      Eb
    Your message has been successfully submitted and would be delivered to recipients shortly.