Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Speedups for BitBoard programs on 64-bit machines

Author: Uri Blass

Date: 23:11:20 06/08/02

Go up one level in this thread


On June 08, 2002 at 22:15:20, Robert Hyatt wrote:

>On June 08, 2002 at 10:41:26, Uri Blass wrote:
>
>>On June 08, 2002 at 10:08:41, Eugene Nalimov wrote:
>>
>>>Usually "profile-based optimizations" means that *compiler* does such the
>>>optimizations. I.e.
>>>
>>>(1) You are building special instrumented version of the program that when run
>>>collects information about where the time in the code spent, as well as other
>>>information compiler compiler can use.
>>>
>>>(2) You are running that instrumented program on a set of scenarios you consider
>>>typical for your program.
>>>
>>>(3) You are re-compiling (or re-linking, depending on the used compiler) your
>>>program, this time specifying "use profile data from my train run". During that
>>>compilation compiler performs lot of new optimizations that use profile data --
>>>code separation, function layout, basic blocks layout, more aggressive inlining,
>>>loop unrolling, etc.
>>>
>>>Shipping Intel C++/Fortran have that feature. Visual C++ can do that for IA-64,
>>>but shipped version for x86 does not include that.
>>>
>>>Eugene
>>
>>Thanks but I am afraid it is not going to help me to know how to do profile
>>based optimizations.
>>
>>I guess that I need to see practical examples of profile based optimization in
>>order to understand.
>>
>>I also have no idea how much speed can be earned thanks to profile based
>>optimization.
>>
>>If it is not more than 10% then it means that I am not going to care about it in
>>the near future.
>>
>>I use visual C++ but movei is written in pure C.
>>
>>Uri
>
>
>It can be 10% or even more.  But the main point is that _you_ do nothing
>except to compile with the profile option, run a good test set, then re-
>compile telling the compiler to use the profile results to produce even faster
>code.
>
>No effort at all...

It still does not help me to understand how to do it.

I guess that you do nothing after writing a specific code for running a good
test suite and calculate some information but I have no idea how to do it.

I think that I can learn by seeing a practical example how to get a speed
advantage from profile-based optimization.

It is possible that the right part of crafty's code that run a good test set may
help me but I doubt if I am going to understand it because crafty is not a
simple program.

I guess that profile-based optimization can also help programs that are more
simple to understand than Crafty so it may be better if I see how  it is done in
a simple program.

Uri



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.