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-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [RFC][Patch] Inline
From: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Mar 2002 08:24:29 -0500

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:

Wow, that's a lot. Most of it is just moving code around, though; only a little bit changes code (e.g. from macro to function). Do you plan to commit it all at once (if you do commit it)?

If these results can be beaten by macros I would like to get such a
patch to get a look at the asm code.

When we tested this before, I compared the results from changing normalize_map_pos from a macro to a function. It ended up being slightly faster as a macro, although i do not have assembly code handy :-).

In any case, there is a tradeoff for using a macro: the code becomes significantly less readible, both in the frontend (interface) and backend (which is also in the interface...). And you know my opinion on that.

jason



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