glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] profiling


From: Luc-Olivier de Charrière
Subject: Re: [glob2-devel] profiling
Date: Sun, 12 Oct 2003 04:07:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030911

Ensuite, je fait une partie entière. (compilation "-g -pg -O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe").
On peut deja être moins fière:
Le CPU:

100.0 % | ***************************************
98.5 % | **
95.0 % | **
93.5 % | **
90.0 % | ***
88.5 % | ***
85.0 % | ***
83.5 % | ***
80.0 % | ***
78.5 % | ***
75.0 % | ***
73.5 % | ***
70.0 % | ***
68.5 % | ***
65.0 % | ***
63.5 % | ***
60.0 % | ****
58.5 % | ****
55.0 % | ****
53.5 % | ***
50.0 % | **
48.5 % | *
45.0 % | *

Le profiling:
Each sample counts as 0.01 seconds.
% cumulative self self total time seconds seconds calls Ks/call Ks/call name 30.41 307.34 307.34 82296 0.00 0.00 Map::updateGradient(int, unsigned char, bool, bool) 18.65 495.87 188.53 31097634 0.00 0.00 Map::ressourceAviable(int, int, bool, int, int, int*, int*, int*, unsigned char) 11.81 615.28 119.41 38806082 0.00 0.00 SDLDrawableSurface::drawFilledRect(int, int, int, int, unsigned char, unsigned char, unsigned char, unsigned char) 9.51 711.39 96.11 3250189284 0.00 0.00 Unit::dxdyfromDirection(int, int*, int*) 4.30 754.81 43.42 3094180667 0.00 0.00 SDLDrawableSurface::drawPixel(int, int, unsigned char, unsigned char, unsigned char, unsigned char) 3.57 790.85 36.04 6924 0.00 0.00 Map::updateGlobalGradient(Building*, bool) 3.46 825.78 34.93 43639932 0.00 0.00 SDLSprite::draw(SDL_Surface*, SDL_Rect const*, int, int, int) 2.93 855.41 29.63 478899 0.00 0.00 SDLDrawableSurface::drawCircle(int, int, int, unsigned char, unsigned char, unsigned char, unsigned char) 2.76 883.29 27.88 1574079 0.00 0.00 Map::nearestRessource(int, int, int, int*, int*) 1.54 898.81 15.52 2570 0.00 0.00 Game::renderMiniMap(int, bool) 0.98 908.75 9.94 83147 0.00 0.00 Game::drawMap(int, int, int, int, int, int, int, bool, bool, bool, bool)
 0.78    916.60     7.85    82200     0.00     0.00  Map::growRessources()
 0.72    923.88     7.28 30539588     0.00     0.00  Building::integrity()
 0.62    930.10     6.22 29149106     0.00     0.00  Building::checkSum()
0.58 935.95 5.85 36278061 0.00 0.00 Map::buildingAviable(Building*, bool, int, int, int*)
 0.57    941.69     5.74 28862636     0.00     0.00  Unit::checkSum()
 0.51    946.88     5.19  2221600     0.00     0.00  Unit::handleMovement()

Sachante que:
0-Le jeu est devenu très lent un long moment de la partie, environ le 3e quart, le reste fluide. 1-Dans "Unit::dxdyfromDirection(int, int*, int*)" , il y a principalement 2 assert(), donc au moins 60% du temps. 2-"Map::ressourceAviable(int, int, bool, int, int, int*, int*, int*, unsigned char)" utilise massivement "Unit::dxdyfromDirection(int, int*, int*)", (1/6 du temps au bol). 3-"Map::ressourceAviable(int, int, bool, int, int, int*, int*, int*, unsigned char)" est surtout utilisé pour optimiser le système d'allocation des unités.
4-Je vient d'optimiser un peut tout ça. (après cette partie).
5-Je vient d'optimiser encore tout ça. (au lieu de dormir.)
et la suite demain...





reply via email to

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