Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Map coordinate cleanups.
Home

[Freeciv-Dev] Re: Map coordinate cleanups.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Justin Moore <justin@xxxxxxxxxxx>
Cc: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, Jason Dorje Short <jshort@xxxxxxxxxxxxx>, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Map coordinate cleanups.
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Mon, 20 Aug 2001 00:19:50 +0200

On Fri, 17 Aug 2001, justin@xxxxxxxxxxx wrote:

> To quote Theo de Raadt, "Know your API, know your API, know your
> API."


>    One problem with lengthy macros that has always bugged me is that
> they're a real pain to debug with gdb.  You get a segfault and you
> know which line it died on, but then you have to figure out where in
> the macro the bug is.  Obviously it's possible, but it's a real
> pain.  A nice thing about functions is the type checking; if you
> change declarations or other function defintitions *too* much
> elsewhere, it could have a negative impact on the rest of the code.

  ((unsigned) x < (unsigned) y)

isn't going to segfault, so we don't need to worry...

>    BTW, has anyone profiled an actual game?  As in not an all-AI
>    one?  I'd be interested to see how much time is spent in all
>    these sections you're trying to optimize as opposed to the
>    select() call in sniff_packets.

I haven't.

On the other hand, I play mostly against the AI, and so having to wait
for the AI to do its thing is the most annoying part of the game.  As
such, the AI and end-of-turn stuff is the critical path for me.

-- 
Big Gaute http://www.srcf.ucam.org/~gs234/ I wonder if there's
anything GOOD on tonight?


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