[Freeciv-Dev] Re: map_adjust_x()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|