Profiling TogaII v1.4.1SE

Questions and comments related to CCRL testing study
Post Reply
mcostalba
Posts: 1
Joined: Sun Jun 15, 2008 11:39 am

Profiling TogaII v1.4.1SE

Post by mcostalba »

Hi all,

I don't know if this is the correct place to post but i didn't find a Toga mailing list.

I have downloaded and profiled Toga 1.4.1SE (the 1.4.3JD version is very similar).


Function Calls Self time % Total time

eval_king 944592 3035937 11,59 4974169
full_search 950708 2922193 11,16 29551284
full_quiescence 1101555 2076703 7,93 17250934
eval 1307095 1789234 6,83 8430142
piece_attack_king 11986788 1266463 4,84 1266463
sort_next 2164338 1210347 4,62 3144383
sort_next_qs 1232062 994070 3,8 3779649
pseudo_is_legal 2880202 777014 2,97 1165365
move_is_check 2619207 714506 2,73 989263
shelter_square 5144705 671769 2,57 671769
is_pinned 5212303 617560 2,36 617560
move_do 1438247 594411 2,27 924366
full_new_depth 2095260 578463 2,21 1461683
move_undo 1438222 576732 2,2 860088


Where "Self time" it's the time needed by the function itself, while "Total time" takes in account also its calee.

It seems that king evaluation is very heavy, in particular piece_attack_king() because it's called for every evaluation and for every opponent piece on the board (it is called 11986788 times, much more then the caller eval_king() ) also sorting it's an important contributor.

My (very different ) questions are

- There is a forum/mailing list /people interested in this kind of analisys ?

- Why, instead of checking if every opponent piece does attack the king is not used the opposite algorithm ? I.e. substitute the king with a same colored queen put in the same position of our king and then a same colored knigth and compute the capture moves from there. Then instead of loop across all the opponent pieces it's enough loop across the (much smaller, possibly empty) captured pieces lists to verify the attack to the king.


Thanks
Marco
Post Reply