On Fri, 9 Dec 2016 03:00:20 +0100 "Enrico Weigelt, metux IT consult" <enrico.weig...@gr13.net> wrote: > in many places we have (semantically) bi-directional relationships, eg. > diplomatic relationships, etc, which are currently implemented as lists > on only one side of the relationship, so when coming from the other > side we'll end up in full list scans. (eg. see ServerPlayer::csKill())
I fear I am beginning to repeat myself, but I really want to see more justification that this is a problem. If you want to optimize, please look at the hot spots, not ultra-rare cases like csKill. > What do you think about implementing an index structure which can be > looked up from both sides (maybe double hashtables, etc) ? I think it would be harder to read. Lists are simple. Code simplicity is valuable. Especially in a project where people wander in and out. Besides, the player list is short... show me a list with >100 members and you have an argument for a quicker data structure. Cheers, Mike Pope
pgpGiOYg6E8Ds.pgp
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi
_______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers