Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_
Home

[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ...
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jun 2003 08:32:14 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Jun 11, 2003 at 06:12:04AM -0700, rwetmore@xxxxxxxxxxxx wrote:
> 
> Raimar Falke wrote:
> > On Wed, Jun 11, 2003 at 02:26:14AM -0700, Per I. Mathisen wrote:
> > 
> >>Removing some debug code from some of the map access macros and functions
> >>can also boost speed by a lot (perhaps another 10%), especially in debug
> >>mode. As someone who always runs in debug mode, I'd very much appreciate
> >>if some of this debug code was turned off unless explicitly turned on for
> >>example by manually changing an undef to a define in map.c. Usually we
> >>don't need to debug the map code.
> > 
> > The question is what are the semantics of the debug mode. We have the
> > no-debug mode (very fast, no asserts) and the normal mode (asserts). A
> > debug then has to do more checks. It sounds like you want to remove
> > checks in the debug mode so get speed. This way you will end up in the
> > normal mode.
> > 
> > This is a list what DEBUG controls:
> [...]
> >  - CHECK_MAP_POS which is a speed penalty but a good one IMHO
> 
> CHECK_MAP_POS replaced efficient checks on a per-code block basis with
> a horrible mess of redundant checks on a per access when it was installed.
> It was always said this was a *very* bad thing to do and should be removed
> from the code when people were convinced that the bugs it was supposed to
> find were removed.
> 
> The pity is that the efficient per-module checks have largely been removed
> and CHECK_MAP_POS is now a permantent feature that Raimar keeps insisting
> is a good thing (TM) every time it comes up.

Some mode should check for unreal access. If this isn't in DEBUG mode
in which mode should this check be abled? Depending on a
STRICT_MAP_POSITION_CHECKING define? What should the DEBUG mode do in
addition to the normal mode?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The very concept of PNP is a lovely dream that simply does not translate to
  reality. The confusion of manually doing stuff is nothing compared to the
  confusion of computers trying to do stuff and getting it wrong, which they
  gleefully do with great enthusiasm." 
    -- Jinx Tigr in the SDM




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