Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: inlining functions
Home

[Freeciv-Dev] Re: inlining functions

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: inlining functions
From: Jason Dorje Short <jshort@xxxxxxxxxxxxx>
Date: Mon, 20 Aug 2001 17:41:26 -0400

Raimar Falke wrote:
> 
> On Fri, Aug 17, 2001 at 08:03:50PM -0400, Jason Dorje Short wrote:

> From the timing and the size it looks like the macro isn't expanded in
> all possible cases OR gcc is also inlining other methods by using
> "-Winline -finline-functions". Looking at the gcc manual it looks like
> the latter is true. So what options have to be passed to gcc to just
> inline the functions which are marked inline?

It looks like you've just solved the problem.

Neither macros nor inlining of functions is necessary for GNU systems -
just compile with -O3 (or -finline-functions) and you'll get better
optimization than we can provide manually.

This doesn't address people on other systems, but I would hope that
either they can compile with gcc also or that their compiler will
provide comparable optimization.

If you still want to compare inlining to macros, I imagine with -O2 or
less gcc will inline those functions marked as "inline" and not any
others.

jason


[Prev in Thread] Current Thread [Next in Thread]