Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2001:
[Freeciv-Dev] Re: map_adjust_x()
Home

[Freeciv-Dev] Re: map_adjust_x()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: map_adjust_x()
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 09 Mar 2001 00:08:43 +0100

Thue <thue@xxxxxxx> writes:

> Right now map_adjust_x only adjusts values in the range 
> [-map.xsize;map.xsize*2], but values outside that range are possible as input 
> (though rare).
> 
> So the correct thing to do is to use modulus.

Please do some timings with this change. Integer modulo is about the
slowest opcode modern CPUS have, it often takes 10-20 cycles. (Not to
mention older Alphas, which have no modulo opcode at all...)

        Falk



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