Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: profiling problem continued :-)

Author: Ricardo Gibert

Date: 20:27:35 02/08/02

Go up one level in this thread


On February 08, 2002 at 18:03:43, martin fierz wrote:

>On February 08, 2002 at 18:00:10, martin fierz wrote:
>
>>On February 08, 2002 at 17:29:39, Matthias Gemuh wrote:
>>
>>>On February 08, 2002 at 14:39:46, martin fierz wrote:
>>>
>>>>On February 08, 2002 at 03:51:14, Matthias Gemuh wrote:
>>>>
>>>>>
>>>>>Timing is a complex issue.
>>>>>Believe the profiler.
>>>>>
>>>>>Regards,
>>>>>Matthias
>>>>
>>>>why? what is wrong with my simple experiment? it's so simple, i don't understand
>>>>what can be wrong about it. and it is real-world, whereas when it's running
>>>>under the profiler everything is messed up with the profiling code. personally,
>>>>i never believed the profiler too much, but after this, i don't believe it at
>>>>all...
>>>>
>>>>aloha
>>>>  martin
>>>
>>>
>>>
>>>Bob Hyatt explained a lot (convincingly) on this topic.
>>>Search the CCC archive for his postings.
>>>
>>>Matthias.
>>
>>i did - can't find anything under hyatt & profiler or hyatt & profilint. but do
>>you really believe that a program doing
>>
>>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?

if "for i=0 to BIGNUMBER" is part of your program, then the timing will be
accurate, otherwise the timing is likely to be misleading.

If test2() makes its appearance, here and there in your program among a lot of
other instructions, it is liable to not be operating completely out of cache,
both data and code.

If test2() is by itself in a tight loop, it will probably work entirely within
the cache, both data and code. Actually this depends how big test2() is, but you
should get the idea.

>
>aloha
>  martin



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.