Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Inline
Home

[Freeciv-Dev] 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] Inline
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Jan 2002 11:11:33 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

The maintainer has decided that inline is the way to go. This
transition should be done in serveral steps:

 1) infrastructure patch:
    - add a test to configure
    - the inlining should be controlled by a USE_INLINE macro (this
    allows to compile versions which can be debugged and profiled)
    - if(!DEBUG) USE_INLINE=1
    - establish a convention where to place inline functions (for
    example in *_inline.c). We should look how other projects do this.
    - document all the above and a guide "How to inline a
    static/non-static function" in freeciv_hackers_guide.txt or
    README.inline
    - the patch should work for gcc and at least another compiler
    (Sun's cc for example)

 2) macro removal patch:
    - convert all macros which are macros for speed reasons into
    normal functions

 3) inline patch:
    - make specific function inline
    - candidates are selected upon profile information and the
    performance gain after inlining them

The time between 2) and 3) should be small.

There was a patch which addressed some issues of 1). Has someone the
time to update it?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Inline, Raimar Falke <=