[Freeciv-Dev] Re: inlining functions
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Aug 20, 2001 at 05:41:26PM -0400, Jason Dorje Short wrote:
> 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.
But gcc won't do any cross source inling for the current code.
> 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.
Average of normal: 1m9.81s = 69.81s
Average of -finline-functions: 1m2.592s = 62.592s
Average of -finline-functions and extern inline map_get_city: 1m1.215s = 61.215s
Average of -finline-functions and map_get_city as macro: 1m0.875s = 60.875s
If some/all functions will be made available for inter source
inlineing the speedups will probably even higher.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"brand memory are for windows users that think their stability
problems come from the memory"
-- bomek in #freeciv
- [Freeciv-Dev] Re: inlining functions, (continued)
- [Freeciv-Dev] Re: inlining functions, Kevin Brown, 2001/08/17
- [Freeciv-Dev] Re: inlining functions, Raimar Falke, 2001/08/19
- [Freeciv-Dev] Re: inlining functions, Kevin Brown, 2001/08/19
- [Freeciv-Dev] Re: inlining functions, Raimar Falke, 2001/08/20
- [Freeciv-Dev] Re: inlining functions, Markus Linnala, 2001/08/20
- [Freeciv-Dev] Re: inlining functions, Raimar Falke, 2001/08/20
- [Freeciv-Dev] Re: inlining functions, Markus Linnala, 2001/08/20
- [Freeciv-Dev] Re: inlining functions, Raimar Falke, 2001/08/20
[Freeciv-Dev] Re: inlining functions, Raimar Falke, 2001/08/20
|
|