Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4417) Use of ISAAC Random generator in Freeciv
Home

[Freeciv-Dev] Re: (PR#4417) Use of ISAAC Random generator in Freeciv

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4417) Use of ISAAC Random generator in Freeciv
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 16 Jun 2003 06:25:01 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 16 Jun 2003, Rafa³ Bursig wrote:
> > Did you measure any increase in autogame speed? I'd like to see some
> > numbers before optimization changes like this are seriously
> > considered. I doubt this code has much performance impact.

Sorry, that won't work. Since you change the random number generator, the
autogames will be different. So you cannot compare autogame run times.

You might try to time a game that only lasts one turn, however.

> When you want full autogame test you need savegame code. I don't made
> it becouse I'm not sure that it is need. ( I little misunderstand
> reason of this part ).

You don't need a savegame, only a test script. See the attached file as an
example. Just run 'time civserver --read test.serv' before and after a
code change to measure performance impact of the code.

> > (And of course, code that doesn't work on 64bit is out of the
> > question.)
> >
> Yes I know but this can be fixed in 2 way.
>
> 1) fix current code. ( see comments on
> http://burtleburtle.net/bob/rand/isaacafa.html )
> 2) use other 64 bit version for this platform ( detect code )

Yes, but this is ugly. If you want to introduce ugly code which needs
additional detection, you need a good reason.

I really doubt that a faster random number generator will make much of a
difference. The only place in the code that I can see myrand() is used
heavily is in mapgen and in unit combat loops.

Please try to analyze what are the current performance bottlenecks
_before_ you start working on solutions.

  - Per

create a
hard
set savet 0
set barbarians 0
set hut 0
set endy 500
set timeout -1
set seed 2354929
set randseed 6236114
start

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