[Freeciv-Dev] improper access of iterators
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
In my quest to improve genlist efficiency I've stumbled across some
improper use of variables within the AI and server code. Look at
ai/aicity.c:1036. The unit_list_iterate is defined in terms of the
TYPED_LIST_ITERATE macro in common/genlist.h. The current macro uses a
genlist_iterator named myiter that the AI and server code references
directly, even though the iterator isn't specifically initialized or even
named within the calling code.
What are people's thoughts about me migrating from the old genlist to
my new genlist? My current version of genlist is backwards compatible
with the old one. The implementation of the ITERATOR_* macros are kind of
hacks and are probably slightly less efficient than the old ones, but I
plan to phase those out if possible. My idea is to migrate code from the
older, slower genlist data structures and iterators to the newer, faster
ones. It would be in a few steps. If people would like more info on
this, I'd be happy to provide it. I really think we could get a good
performance gain out of a more efficient genlist, but I'd like some
feedback on my ideas.
Thanks.
-jdm
Department of Computer Science, Duke University, Durham, NC 27708-0129
Email: justin@xxxxxxxxxxx
- [Freeciv-Dev] improper access of iterators,
Justin Moore <=
- [Freeciv-Dev] Re: improper access of iterators, Raimar Falke, 2001/08/26
- [Freeciv-Dev] Re: improper access of iterators, Justin Moore, 2001/08/26
- [Freeciv-Dev] Re: improper access of iterators, Raimar Falke, 2001/08/26
- [Freeciv-Dev] Re: improper access of iterators, Justin Moore, 2001/08/26
- [Freeciv-Dev] Re: improper access of iterators, Jason Dorje Short, 2001/08/26
- [Freeciv-Dev] Re: improper access of iterators, Raimar Falke, 2001/08/27
- [Freeciv-Dev] Re: improper access of iterators, Gaute B Strokkenes, 2001/08/27
|
|