Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_
Home

[Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#4381) some clean with get_map_tile(...) , get_map_terrain(...), get_map_special(...) ...
From: "Rafa³ Bursig" <bursig@xxxxxxxxx>
Date: Thu, 12 Jun 2003 10:49:59 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Dnia 2003.06.11 11:26, Per I. Mathisen napisa³(a):
> 
> The problem is I don't believe you will gain anything. The set
> operations are called extremely few times compared to get operations. 
> At the risk
> of sounding like Raimar, can you back up this with some numbers to 
> show
> that these changes actually improve speed in a measurable way?
> 
Hi All

I made some fix in my patch and made next version. Current I turned all 
ptile access to macros and replace it in code. (ptile->terrain to 
tile_get_terrain(ptile) etc). Patch is working and I made some tests.

Next I must say that my cpu allow me only some test with debug=no (-O3 
-> speed) and only in 30 min. each. One test take 2 hours and I made 3.
I made shell script that run 4 time each type of server and cron 
command call killall civserver with 30 min delay.

Normal server :
1) 1249.36user 1.41system 29:59.76elapsed 69%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+18327minor)pagefaults 0swaps
last autosave +1925

2) 1340.88user 1.15system 29:59.99elapsed 74%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+14338minor)pagefaults 0swaps
last autosave +1790

3) 1295.72user 1.31system 29:59.93elapsed 72%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+19126minor)pagefaults 0swaps
last autosave +1915

4) 1324.44user 1.25system 29:59.95elapsed 73%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+17497minor)pagefaults 0swaps
last autosave +1890

Patched server :
1) 1339.98user 1.24system 29:59.79elapsed 74%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (423major+16938minor)pagefaults 0swaps
last autosave +1830

2) 1351.49user 1.23system 29:59.93elapsed 75%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (423major+18091minor)pagefaults 0swaps
last autosave +1850

3) 1267.70user 1.28system 29:59.84elapsed 70%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (423major+18143minor)pagefaults 0swaps
last autosave +1925

4) 1369.53user 1.16system 29:59.77elapsed 76%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (423major+15279minor)pagefaults 0swaps
last autosave +1810

Patched server + map_get_tile as macro :
1) 1306.36user 1.28system 30:00.17elapsed 72%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+16505minor)pagefaults 0swaps
last autosave +1890

2) 1321.31user 1.20system 29:59.77elapsed 73%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+17222minor)pagefaults 0swaps
last autosave +1870

3) 1348.20user 1.27system 29:59.76elapsed 74%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+16293minor)pagefaults 0swaps
last autosave +1830

4) 1340.14user 1.26system 29:59.82elapsed 74%CPU (0avgtext+0avgdata 
0maxresident)k
0inputs+0outputs (421major+16801minor)pagefaults 0swaps
last autosave +1870


For me it look little strange becouse normal server is faster even from 
map_get_tile as macro.

Rafal

Attachment: clean4.diff.bz2
Description: clean4.diff.bz2


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