[Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9020 >
On Fri, 18 Jun 2004, Per Inge Mathisen wrote:
> > I disagree.I think it would be better just to enable a higher
> > optimization level in the compiler. Static functions can easily be
> > automatically inlined by an intelligent compiler, and we can hope it
> > will do a better job than we would at guessing which ones are the best
> > to inline.
>
> Well, that depends on whether we will actually use a higher optimization
> level or not, does it not?
>
> I have my doubts that everyone will agree that running all debug levels in
> -O3 is a good idea, and please do not make it so that --enable-debug=yes
> is unplayable.
>
> Maybe selectively picking gcc optimizations is a better idea than using
> -O3, though.
>
> >From the gcc manual: "-O3 turns on all optimizations specified by -O2 and
> also turns on the -finline-functions, -fweb and -frename-registers
> options. " About -frename-registers and -fweb it says they can "make
> debugging impossible", so it might not be a good idea to use them.
Even O2 makes debugging if not impossible but very hard. Anyone who tried
to step through a function in gdb knows that the execution jumps between
lines erratically and the variables that you see do not necessarily exist.
So when I plan to do debugging, I compile with O0.
Also, for debugging having map_get_tile a macro would be quite bad, AFAIK
debugger doesn't recognize macros.
G.
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Per Inge Mathisen, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Jason Short, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Gregory Berkolaiko, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Jason Short, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Per Inge Mathisen, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Vasco Alexandre da Silva Costa, 2004/06/18
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, rwetmore@xxxxxxxxxxxx, 2004/06/19
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Jason Short, 2004/06/19
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile,
Gregory Berkolaiko <=
- [Freeciv-Dev] Re: (PR#9020) optimization of map_get_tile, Jason Short, 2004/06/20
|
|