Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7195) inlining map_pos_to_index
Home

[Freeciv-Dev] Re: (PR#7195) inlining map_pos_to_index

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jshort@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7195) inlining map_pos_to_index
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Jan 2004 09:09:53 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7195 >

rwetmore@xxxxxxxxxxxx wrote:

> Since macros will never be less efficient than inline functions, have no
> compiler dependencies (since the preprocessor generates "C" code that is
> handled by the compiler just like all other code), if one is interested
> in performance optimization macros should always be used over inline
> functions.

Just to remind you, in this case the macro form is less efficient than 
the inline form.

> The rewriting of code like terrain.c to strip macros without performance
> testing so Raimar can show limited recovery of performance by inlining over
> function calls (but of course not doing the comparable macro optimizations)
> is really just a make over project to convert Freeciv to a different
> programming style. That is one of the previous reasons for the complete
> block on inlining, i.e. the slippery slope to wasted style conversions.

That's not the intention, but I do see your point.

jason




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