Re: Clip Optimization
- --- In email@example.com, "silvermoonwoman2001" <silvermoonwoman@...> wrote:
>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.
> --- In firstname.lastname@example.org, 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
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.