Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Arasan 7.4 64-bit Speedup

Author: Russell Reagan

Date: 15:14:28 03/30/04

Go up one level in this thread


On March 30, 2004 at 16:20:52, Dieter Buerssner wrote:

>On March 30, 2004 at 02:34:21, Slater Wold wrote:
>
>>64-bit Arasan compiled with: -O2 -Ot -Og -Oi -Gr -GX -Oy -Ob2 -GL
>
>For my programs (and I don't have any 64-bit environments), omitting -Ob2 was
>always faster. The same when using GCC - allowing it to inline everything
>suitable produces slower code. In really time critical applications, where I
>thought that some functions should be inlined, I noted so to the compiler
>(__force_inline/__inline__). Letting the compiler chose itself seemed always
>worse.
>
>Regards,
>Dieter

I think that with the latest VC++ you do not have the option to turn of
inlining, and the default is to "inline any suitable". Last night I was trying
to profile a chess program, and I wanted to turn off all inlining so that all
functions would show up in the profile. I had to use gcc and gprof, because the
default in VC++ .NET 2003 is to inline any suitable function, and I couldn't
find any option to turn of inlining. gcc has -fno-inline. Well, actually I
changed the setting in VC++ to only inline if the function was declared
__inline, but even then, I was not sure if all functions were not inlined.

From this webpage, it says:

http://msdn.microsoft.com/chats/vstudio/vstudio_032703.asp

"Q: Is there a good rule of thumb when to use inline functions or not?

A: Starting with VC7.0, auto-inlining (-Ob2) is on by default. This means that
all functions are inline candidates. We do slightly favor functions marked as
inline in some cases however. In general, marking function as inline will not
change much. A function can only be inlined if the call site and the definition
are visible to the compiler, so the definition needs to be in a header file or
you want to use link-time-codegen. In general, small functions that are called
frequently are the best candidates. Function with constants passed as arguments
are also good."



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.