[Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player b
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 17 May 2000, Thue Janus Kristensen wrote:
>On Wed, 17 May 2000, Mika Korhonen wrote:
>> On Wed, 17 May 2000, Thue Janus Kristensen wrote:
>> >Btw; maybe these oneilne functions like map_get_know() should be made into
>> >macros to avoid the overhead of a function call; is the saving worth it?
>> >Is there any reason not to?
>>
>> Or what about making them inline which is effectively the same thing?
>> (Don't some compilers with sufficient flags already do that for short
>> functions, do they?)
>>
>> Mika
>
>no, inline would not work.
>-it only substitutes for occurences in the same file
>-it is not standard C; only GNU C.
>see http://gcc.gnu.org/onlinedocs/gcc_4.html#SEC95
>
>-Thue
Well, the URL also answers my guess about inlining simple functions
(when using gcc). The flag is: -finline-functions
So at least you can experiment how much this affects the speed unless
freeciv already applies an optimizing level heavy enough to switch on the
inline flag in which case those using gcc (which already makes quite many)
won't gain anything if the functions get replaced with macros. Of course
we are left with the question if those functions are 'simple enough' to be
inlined.
Mika
_______________________________________________________________________________
"Every man has his price. Mine is $3.95."
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), (continued)
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Jules Bean, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Reinier Post, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Jules Bean, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Mika Korhonen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Thue Janus Kristensen, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug),
Mika Korhonen <=
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Robert Brady, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Daniel Burrows, 2000/05/17
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Jed Davis, 2000/05/19
- [Freeciv-Dev] Re: somebody fix struct *player! (was: FoW remove player bug), Tony Stuckey, 2000/05/17
[Freeciv-Dev] Re: FoW remove player bug, Daniel Burrows, 2000/05/16
|
|