Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: profiling problem continued :-)

Author: David Dory

Date: 00:50:27 02/09/02

Go up one level in this thread


hi martin,

I think your "simple experiment", as you posted in your first post, was rather
unscientific, (in the British sense of very). I may have missed something & I'm
certainly not a code guru, but I am unable to see how you are testing the
unknown against a known standard.

It looks more like you are testing one unknown value (from the profiler),
against the other (your own timing function). I believe you will find the best
results if you test your function with one method or the other, or both, but
don't extrapolate results from one testing method to the other testing method.
You don't have (or haven't shown), a proven relationship between these two
testing methods.

I believe the interaction of computer timing methods is too complex and variable
to make assumptions based on dissimilar testing methods without first proving a
relationship between these two methods, first.

>>for i=0 to bignumber
>wait, i wanted to go a line down, not post the message :)
>so:
>
>t = clock();
>for i=0 to BIGNUMBER
>   test1(i);
>t1 = clock()-t;
>
>t=clock();
>for i=0 to BIGNUMBER
>   test2(i);
>t2 = clock()-t;


>will not produce accurate results for how fast test1 and test2 are running?

This is much better than the first postings code, but, in Windows?? You're
joking, right? You'll come up with an approximation (certainly not down to
1/1000 sec. as the docs say)!

If you run the exact same data thru this kind of loop, you'll see the time
varies in a clumpy pigeon-hole type fashion.

Good luck

Dave



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.