Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty profile on fast P3/P4/AMD/SMP compiled with gcc, MSVC,Intel C++

Author: martin fierz

Date: 14:09:49 02/15/02

Go up one level in this thread


On February 14, 2002 at 17:17:18, Eugene Nalimov wrote:

>Is it possible that by removing some code from your program you speed up the
>remaining code? E.g. better cache locality, less information for branch
>predictor to store (less conflicts), etc.?
>
>Eugene

i guess i didn't think of that, i admit. it's surely possible, but how do i test
it?

aloha
  martin

>On February 14, 2002 at 16:54:32, martin fierz wrote:
>
>>On February 14, 2002 at 02:42:53, Artem Pyatakov wrote:
>>
>>>Martin,
>>>
>>>I have used profiles successfully MANY times to find out which specific areas of
>>>the program need optimization. What do you mean by "it just does not work"?
>>>Also, kNPS does not tell you what is making the program slow - profiles often
>>>do.
>>>
>>>Artem
>>
>>i mean what i say - the profiler is interfering so much with your program, that
>>you cannot trust what it says. i recently programmed an endgame database builder
>>for checkers and wanted to know if the positiontoindex or the indextoposition
>>function is faster. i asked the profiler which told me that indextoposition is 8
>>times faster.
>>this profile was generated in a loop
>>
>>for(i=0;i<dbsize;i++)
>>  {
>>  indextoposition(...)
>>  positiontoindex(...)
>>  }
>>
>>the time to run this program without profiling was 17 seconds. when i took out
>>the positiontoindex function of the loop, it took 13 seconds to run. since both
>>functions are rather complex, and since there are no common parts of the two
>>functions, it is clear that in fact, in the real program, positiontoindex is 3
>>times faster. this is off by a factor of 24 compared to what the profiler says.
>>since the second method is clearly measuring actual performance of my program, i
>>have to conclude that the profiler is dead wrong.
>>i guess it has something to do with the fact that positiontoindex calls some
>>small subroutines, while indextoposition does not. this makes the
>>positiontoindex routine seem slower in the profiling process than it actually is
>>since the profiler tries to profile the subroutines too. just a guess...
>>
>>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.