[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, 2 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Sun, Sep 02, 2001 at 07:58:15PM +0200, Gaute B Strokkenes wrote:
>> On Sun, 02 Sep 2001, gs234@xxxxxxxxx wrote:
>>
>> Allow me to elaborate. The above would be perfectly fine if we
>> inlined both mapstep() and normalize_map_pos(). As long as we
>> don't, the perfomance loss associated with tacking two function
>> calls on to half of the leaf functions in Freeciv is IMNSHO not
>> justifiable on the gounds that you can reduce the number of places
>> with topological knowledge in map.[ch] from ten to five.
>
> In the long term I think we should/will have inline methods. I see
> no reason to not make the critical methods inline.
The concern that was raised the last time this came up was that inline
is not, strictly speaking, ISO C89 and also that current versions of
GCC expand inline functions at a fairly late stage in the compilation
process, so that optimization opportunities may be missed.
My own intuition is that just about all half-reasonable C compilers
support inline functions, and that we can live with real function
calls on the platforms that do not. Also, GCC 3.0 and later has a
better inliner, and the penalty is not likely to be high.
I suggest that someone with the spare cycles tries to run a test game,
once with Jason's patch + inline normalize_map_pos() and once with no
changes at all.
If the difference in performance is not significant, and I do not
think it will be, then we can change MAPSTEP and the others to be
inline functions. Until then, I suggest just leaving it as is.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
.. the HIGHWAY is made out of LIME JELLO and my HONDA
is a barbequed OYSTER! Yum!
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, (continued)
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Gaute B Strokkenes, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Raimar Falke, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Gaute B Strokkenes, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Raimar Falke, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Trent Piepho, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Raimar Falke, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Trent Piepho, 2001/09/02
- [Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Raimar Falke, 2001/09/02
[Freeciv-Dev] Re: [PATCH] Corecleanup_07Part2 has been put in incoming, Gaute B Strokkenes, 2001/09/02
|
|