[Freeciv-Dev] Re: Profiling Civserver again
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Fri, 3 Aug 2001, mastro@xxxxxxxxxx wrote:
> Paul Zastoupil wrote:
>> On Fri, Aug 03, 2001 at 02:07:11AM +0200, Gaute B Strokkenes wrote:
>> > Paul, could you try this?
>>
>> http://civserver.freeciv.org/~paulz/gprof-gs234.txt
>
> Ehm...
> I'm sorry, but this code:
>
> #define map_adjust_x(X) \
> ((X) < 0 \
> ? ((X) % map.xsize + map.xsize) \
> : ((X) >= map.xsize \
> ? (X) % map.xsize \
> : (X)))
>
> will reopen the bug
> <http://www.freeciv.org/cgi-bin/bugs?findid=749>.
Ooops. However, according to Paul's profiling efforts this cuts the
time taken from 603.58 to 464.21 seconds, a 24% speedup. That's
pretty good, so I think my observation that modulo operations are very
expensive is sound.
Could someone try replacing
((X) % map.xsize + map.xsize)
above with
((X) % map.xsize != 0 ? (X) % map.xsize + map.xsize : 0)
and see what happens, bug-wise as well as profile-wise. Assuming it
gives good results in both respects, it really ougth to go in for
1.12.0. It's just such a huge win.
> If we want to try to speed up Freeciv, we should also try to
> evaluate the impact of options like "-march=i686" or "-march=athlon"
> to gcc (all the recent x86 processors have CMOVs instructions that
> can eliminate many branches).
--
Big Gaute http://www.srcf.ucam.org/~gs234/
LOU GRANT froze my ASSETS!!
- [Freeciv-Dev] Re: Profiling Civserver again, (continued)
- [Freeciv-Dev] Re: Profiling Civserver again, Vasco Alexandre Da Silva Costa, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Trent Piepho, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Vasco Alexandre Da Silva Costa, 2001/08/01
- [Freeciv-Dev] Re: Profiling Civserver again, Trent Piepho, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Greg Wooledge, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Jules Bean, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/08/06
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Paul Zastoupil, 2001/08/02
- [Freeciv-Dev] Re: Profiling Civserver again, Lino Mastrodomenico, 2001/08/03
- [Freeciv-Dev] Re: Profiling Civserver again,
Gaute B Strokkenes <=
- [Freeciv-Dev] Re: Profiling Civserver again, Gaute B Strokkenes, 2001/08/04
|
|