On Tue, May 11, 2010 at 04:50:17PM -0500, Geoffrey Furnish wrote:
> Alan W. Irwin writes:
>  > Since your question is of general interest to developers, I am posting my
>  > reply to the list.
>  > 
>  > > I'm working on Tcl #19.  I'm close to getting it straightened out, hope 
> to
>  > > commit soon.
>  > >
>  > > Question: In my own comparisons between the C and Tcl examples,
>  > > generated by manual invocation of the various examples, I'm seeing that
>  > > the psc output has a timestamp in it.  Does your script have a way of
>  > > filtering that out?  Can you tell me how to observe how that part of
>  > > this comparison works?
>  > 
>  > To see exactly what scripts are being run, use VERBOSE=1, e.g.,
>  > 
>  > make VERBOSE=1 test_diff_psc  >& make.out
>  > 
>  > Once you have identified that the script is plplot_test/test_diff.sh(.in),
>  > then the answer quickly follows that "tail" is used to get rid of the date
>  > stamp before diff is used.
>  > 
>  > Andrew, I believe it was your decision to use tail and diff.  Did you
>  > consider the possibility of using cmp with the -i option instead?  I do
>  > notice that the combination of tail and diff takes a noticeable length of
>  > time because of the huge number of files involved, but for platforms like
>  > Linux I suspect cmp would be considerably faster.
> 
> Uhh...   I certainly have no recollection of that.
> 
> My suggestions would be, in order of preference:
> 
> 1) eliminate the timestamp in the ps(c) output
> 
> 2) Use grep -v to elide the one line, then diff the rest.
> 
> I am using Tcl 8.5 at the moment, and did not recall the earlier portion of
> the thread you quoted.  I am still a long way from being caught up, in any
> meaningful sense of the word.  But at least I managed to get something done
> this release cycle.

The timestamp has been around for a very long time. Does anyone remember why 
it was originally included? Like Alan, I'm neutral about keeping / removing
it. I can see arguments both way, but I don't feel strongly.

Your grep idea would work, but is not really any more efficient than the 
current tail approach. Alan's idea of using cmp may be more efficient on 
Linux. I've not tried timing it. Not copying large files around must be
more efficient. Is cmp widely available on non-Linux platforms? I suspect 
diff / tail are more common.

The main reason I used diff / tail was just because that was what I always 
did by hand before I wrote the test_diff.sh script.

Andrew

------------------------------------------------------------------------------

_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to