Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: server/settlers.c cleanup 2
Home

[Freeciv-Dev] Re: server/settlers.c cleanup 2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: server/settlers.c cleanup 2
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Date: Mon, 15 Apr 2002 17:13:15 +0100 (BST)

On Sat, 13 Apr 2002 per@xxxxxxxxxxx wrote:

> I'd say that is an acceptable approximation to the behaviour of the old
> amortize.
> 
> I timed the tests, and old amortize performed as follows:
> real    0m0.770s
> user    0m0.740s
> sys     0m0.000s
> 
> The new amortize as follows:
> real    0m0.549s
> user    0m0.550s
> sys     0m0.000s
> 
> Strange, huh? Lesson: It is difficult to outsmart a good compiler and a
> modern CPU with performance hacks.

wow...
I guess it's some FP being done separately trickery.
what happens if you precompute the whole range??

BTW, I don't know what maintainers say but you can concievably separate 
amortize into a separate patch and then look for real behaviour changes.

(As I am working through a backlog of email, this opinion has been 
probably already expressed).

G.




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