Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2002:
[Freeciv-Dev] Re: [RFC][Patch] Inline
Home

[Freeciv-Dev] Re: [RFC][Patch] Inline

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC][Patch] Inline
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Mar 2002 20:33:26 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Mar 21, 2002 at 10:04:39AM +0100, Raimar Falke wrote:
> 
> There was a major network breakdown (three universities and ten other
> research institutes were offline). So I could commit patches. I took
> the time to work in the performance front.
> 
> The attached patch is a first cut on inlining functions. It does:
>  - move city and unit list to their own files: unit_list.[ch] and
>  city_list.[ch]
>  - demerge dependencies
>  - add missing dependencies
>  - move type declaration into new files improvement_types.h,
>  tech_types.h and unittype_types.h. I don't know a way to avoid this.
>  - move functions which are called a lot out of foo.c and into
>  foo_inline.h. I just took the roughtly top 40 most called functions.
>  - allow the inlining of these functions if USE_INLINE is
>  defined. There is currently no support for this in configure or
>  makefiles. You have to specify it by hand. Make sure you also have at
>  least -O specified.
>  - move some functions to other files where they really belong. Saves
>  an include.
>  - demacrofy some of the macros of map.h
>  - inline some static functions.
   - remove the disabling of autogames if NDEBUG is set

> Usage:
>  - unpack
>  - patch -p1 <inline1.diff
   - autoheader && autoconf && automake && ./configure
>  - make clean
>  - either 

>      make 

This builds a version without inlining.

>    or 

>      make CPPFLAGS="-DUSE_INLINE"

This builds a version with inlining.

Please do a "make clean" if you switch between them.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "When C++ is your hammer, everything looks like a thumb."
    -- Steven M. Haflich


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