Author: Michel Langeveld
Date: 11:04:32 11/25/01
I have profiled my chessprogram and got the following output [see below]
What I don't understand is:
- filebuf::sync(void) (filebuf.obj) has highest Func+Child %. Is this normal?
- Both alphaBetaWhite + alphaBetaBlack are > 100%
- % of generateBlackMoveList(struct > % generateMovesForBlackPiece
Profile: Function timing, sorted by time
Date: Sun Nov 25 19:57:04 2001
Program Statistics
------------------
Command line at 2001 Nov 25 19:55: "C:\nullmover\Release\nullmover"
Total time: 2489,887 millisecond
Time outside of functions: 27,193 millisecond
Call depth: 26
Total functions: 180
Total hits: 17684345
Function coverage: 78,3%
Overhead Calculated 658
Overhead Average 658
Module Statistics for nullmover.exe
-----------------------------------
Time in module: 2462,694 millisecond
Percent of time in module: 100,0%
Functions in module: 180
Hits in module: 17684345
Module function coverage: 78,3%
Func Func+Child Hit
Time % Time % Count Function
---------------------------------------------------------
800,390 32,5 800,513 32,5 1635 filebuf::sync(void) (filebuf.obj)
226,612 9,2 226,612 9,2 4642901 addHash(char,int,unsigned __int64
&) (hash.obj)
175,025 7,1 175,025 7,1 853387 attackedByWhite(int) (attack.obj)
153,232 6,2 279,665 11,4 854924 doBlackMove(struct moveType)
(board.obj)
140,621 5,7 140,621 5,7 3035584 evalPiece2(int &) (board.obj)
140,612 5,7 140,612 5,7 695547 attackedByBlack(int) (attack.obj)
127,576 5,2 659,054 26,8 828388 addBlackMoveWithCheckCheck(struct
moveListType *,int,int,int) (board.obj)
109,712 4,5 209,868 8,5 692539 doWhiteMove(struct moveType)
(board.obj)
95,454 3,9 497,287 20,2 668947 addWhiteMoveWithCheckCheck(struct
moveListType *,int,int,int) (board.obj)
69,180 2,8 69,180 2,8 1166166
addMoveToMoveListNoCheckCheck(struct moveListType *,struct moveType *)
(board.obj)
59,599 2,4 59,599 2,4 854924 restoreBlackMove(struct
moveType,int,char,unsigned __int64) (board.obj)
50,934 2,1 50,934 2,1 1011070 evalMove(struct moveType *)
(board.obj)
38,096 1,5 126,901 5,2 25102 sortMoveList(struct moveListType
*) (search.obj)
37,166 1,5 37,166 1,5 692539 restoreWhiteMove(struct
moveType,int,char,unsigned __int64) (board.obj)
36,399 1,5 177,019 7,2 47431 generatePositionScore2(void)
(board.obj)
30,537 1,2 88,805 3,6 614609 compare(void const *,void const
*) (search.obj)
13,830 0,6 409,558 16,6 12365 generateBlackMoveList(struct
moveListType *) (board.obj)
13,827 0,6 236,771 9,6 58433
generateMovesForBlackBishop(struct moveListType *,int) (board.obj)
13,694 0,6 295,541 12,0 49728 generateMovesForBlackRook(struct
moveListType *,int) (board.obj)
11,811 0,5 421,135 17,1 12739 generateWhiteMoveList(struct
moveListType *) (board.obj)
11,267 0,5 708,500 28,8 160300 generateMovesForBlackPiece(struct
moveListType *,int,char) (board.obj)
10,024 0,4 322,796 13,1 23528 isBlackCantMove(void) (board.obj)
8,787 0,4 158,041 6,4 24135 generateMovesForWhiteRook(struct
moveListType *,int) (board.obj)
7,615 0,3 532,097 21,6 122239 generateMovesForWhitePiece(struct
moveListType *,int,char) (board.obj)
7,334 0,3 7,334 0,3 181690 evaluatePiece(char) (board.obj)
7,285 0,3 117,919 4,8 35093
generateMovesForWhiteBishop(struct moveListType *,int) (board.obj)
6,867 0,3 1236,538 50,2 22026 qsearchBlack(int,int)
(search.obj)
6,142 0,2 128,914 5,2 26536 isWhiteCantMove(void) (board.obj)
6,021 0,2 1177,734 47,8 25614 qsearchWhite(int,int)
(search.obj)
5,816 0,2 150,412 6,1 30732 generateMovesForWhiteKing(struct
moveListType *,int) (board.obj)
5,639 0,2 394,513 16,0 11817
generateWhiteCapturesMoveList(struct moveListType *) (board.obj)
5,034 0,2 360,372 14,6 10891
generateBlackCapturesMoveList(struct moveListType *) (board.obj)
4,688 0,2 77,098 3,1 53737 generateMovesForBlackPawn(struct
moveListType *,int) (board.obj)
3,752 0,2 1654,301 67,2 9117 alphaBetaWhite(int,int,int)
(search.obj)
3,586 0,1 60,048 2,4 14654 generateMovesForBlackKing(struct
moveListType *,int) (board.obj)
3,380 0,1 1637,368 66,5 10429 alphaBetaBlack(int,int,int)
(search.obj)
2,654 0,1 67,628 2,7 13516
generateMovesForWhiteKnight(struct moveListType *,int) (board.obj)
2,592 0,1 30,460 1,2 30917 generateMovesForWhitePawn(struct
moveListType *,int) (board.obj)
2,468 0,1 2,468 0,1 29040 field2xy_int(int,int *,int *)
(utility.obj)
2,384 0,1 27,776 1,1 12206
generateMovesForBlackKnight(struct moveListType *,int) (board.obj)
0,816 0,0 0,901 0,0 229 ostream::operator<<(int)
(ostrint.obj)
0,470 0,0 2446,656 99,3 1 alphaBetaRoot(int,struct moveType
*,bool) (search.obj)
0,431 0,0 0,748 0,0 707 ostream::writepad(char const
*,char const *) (ostream.obj)
0,336 0,0 2,787 0,1 1 initFieldIsConnected(void)
(board.obj)
0,315 0,0 0,316 0,0 1 filebuf::open(char const
*,int,int) (filebuf1.obj)
0,274 0,0 0,274 0,0 2236 ostream::opfx(void) (ostream.obj)
0,254 0,0 0,254 0,0 675 topMoveList(struct moveListType
*,int) (search.obj)
0,203 0,0 0,391 0,0 2342 streambuf::sputc(int)
(ostrchar.obj)
0,200 0,0 0,200 0,0 1 filebuf::close(void)
(filebuf.obj)
0,164 0,0 0,787 0,0 1529 ostream::operator<<(unsigned
char) (ostrchar.obj)
0,146 0,0 0,146 0,0 2236 ostream::osfx(void) (ostream.obj)
0,146 0,0 737,651 30,0 216 printMove(class ostream &,struct
moveType,bool) (utility.obj)
0,136 0,0 0,317 0,0 707 streambuf::xsputn(char const
*,int) (streamb.obj)
0,123 0,0 0,123 0,0 1635 streambuf::in_avail(void)
(filebuf.obj)
0,119 0,0 731,606 29,7 434 printField(class ostream &,int)
(utility.obj)
0,105 0,0 0,432 0,0 813 filebuf::overflow(int)
(filebuf.obj)
0,094 0,0 63,812 2,6 208 flush(class ostream &)
(board.obj)
0,092 0,0 0,092 0,0 1 TimeStamp::startTimer(void)
(timestamp.obj)
0,087 0,0 0,087 0,0 436 field2xy(int,char *,char *)
(utility.obj)
0,064 0,0 0,079 0,0 813 streambuf::allocate(void)
(streamb.obj)
0,061 0,0 736,709 29,9 818 ostream::flush(void)
(ostream.obj)
0,055 0,0 2462,177 100,0 1 init(void) (nullmover.obj)
0,053 0,0 63,865 2,6 208 ostream::operator<<(class ostream
& (*)(class ostream &)) (board.obj)
0,044 0,0 0,053 0,0 1 initScoreBoards(void) (board.obj)
0,041 0,0 0,853 0,0 478 ostream::operator<<(char const *)
(ostream.obj)
0,038 0,0 8,339 0,3 1 printPosition(class ostream
&,struct positionType,int) (utility.obj)
0,018 0,0 0,060 0,0 64 addWhitePromotions(struct
moveListType *,int,int,int) (board.obj)
0,017 0,0 0,017 0,0 4 emptyBoard(char (*)[120])
(board.obj)
0,015 0,0 0,015 0,0 1 streambuf::doallocate(void)
(streamb.obj)
0,014 0,0 0,014 0,0 1 TimeStamp::stopTimer(void)
(timestamp.obj)
0,011 0,0 0,016 0,0 4 ios::~ios(void) (_ios.obj)
0,011 0,0 0,034 0,0 8 generateHashValue(void)
(hash.obj)
0,010 0,0 0,010 0,0 84 charToPiece(char) (utility.obj)
0,010 0,0 5,168 0,2 3 printMoveList(class ostream
&,struct moveListType *,bool) (utility.obj)
0,007 0,0 0,044 0,0 3 setupEpd(char *) (utility.obj)
0,006 0,0 0,006 0,0 4 streambuf::~streambuf(void)
(streamb.obj)
0,006 0,0 0,010 0,0 1 _$E18 (cerrinit.obj)
0,005 0,0 0,006 0,0 1 ofstream::ofstream(void)
(ofstream.obj)
0,005 0,0 0,013 0,0 1 initConvertors(void) (board.obj)
0,004 0,0 0,214 0,0 4 filebuf::`scalar deleting
destructor'(unsigned int) (filebuf.obj)
0,004 0,0 0,214 0,0 4 filebuf::`vector deleting
destructor'(unsigned int) (filebuf.obj)
0,004 0,0 0,010 0,0 1 _$E18 (data.obj)
0,003 0,0 0,003 0,0 84 pieceToChar(char) (utility.obj)
0,003 0,0 0,004 0,0 1 position2Fen(char *)
(utility.obj)
0,003 0,0 0,945 0,0 1 printBoardOnly(class ostream
&,char (*)[120]) (utility.obj)
0,003 0,0 0,003 0,0 1 TimeStamp::diffTime(void)
(timestamp.obj)
0,002 0,0 0,002 0,0 84 setPieceToPosition(int,char)
(board.obj)
0,002 0,0 2462,666 100,0 1 _main (nullmover.obj)
0,002 0,0 0,209 0,0 4 filebuf::~filebuf(void)
(filebuf.obj)
0,002 0,0 0,004 0,0 1 _$E15 (cerrinit.obj)
0,002 0,0 0,210 0,0 1 _$E16 (data.obj)
0,001 0,0 0,002 0,0 1 _$E15 (cininit.obj)
0,001 0,0 0,167 0,0 1 printCastlingRights(class ostream
&) (utility.obj)
0,001 0,0 0,002 0,0 2
ostream_withassign::ostream_withassign(class streambuf *) (ostream.obj)
0,001 0,0 0,059 0,0 1 isMate(void) (board.obj)
0,001 0,0 0,001 0,0 2 streambuf::setb(char *,char
*,int) (streamb.obj)
0,001 0,0 0,013 0,0 1 _$E16 (cininit.obj)
0,001 0,0 0,001 0,0 3 ostream::ostream(class streambuf
*) (ostream.obj)
0,001 0,0 0,310 0,0 1 printKingFields(class ostream &)
(utility.obj)
0,001 0,0 0,032 0,0 4 initBoard(void) (board.obj)
0,001 0,0 0,001 0,0 1 istream::istream(class streambuf
*) (istream.obj)
0,001 0,0 0,001 0,0 1
istream_withassign::istream_withassign(class streambuf *) (istream.obj)
0,000 0,0 0,000 0,0 4 ios::ios(void) (_ios.obj)
0,000 0,0 0,001 0,0 1 _$E15 (iostrini.obj)
0,000 0,0 0,001 0,0 3 filebuf::filebuf(int)
(filebuf.obj)
0,000 0,0 0,000 0,0 4 streambuf::streambuf(void)
(streamb.obj)
0,000 0,0 0,000 0,0 4 streambuf::sync(void)
(streamb.obj)
0,000 0,0 0,000 0,0 3
Iostream_init::Iostream_init(class ios &,int) (iostrini.obj)
0,000 0,0 0,000 0,0 1 moveType2Str(struct moveType
*,char *) (utility.obj)
0,000 0,0 0,000 0,0 4 ios::init(class streambuf *)
(_ios.obj)
0,000 0,0 0,000 0,0 1 _$E21 (iostrini.obj)
0,000 0,0 0,003 0,0 1 _$E18 (cininit.obj)
0,000 0,0 0,000 0,0 1 _$E21 (cininit.obj)
0,000 0,0 0,000 0,0 1 moveColor2Char(int) (utility.obj)
0,000 0,0 0,000 0,0 1 _$E21 (cerrinit.obj)
0,000 0,0 0,000 0,0 2
ostream_withassign::~ostream_withassign(void) (ostream.obj)
0,000 0,0 0,004 0,0 1 _$E16 (iostrini.obj)
0,000 0,0 0,001 0,0 1 _$E20 (cerrinit.obj)
0,000 0,0 0,001 0,0 1 _$E16 (cerrinit.obj)
0,000 0,0 0,000 0,0 1
istream_withassign::~istream_withassign(void) (istream.obj)
0,000 0,0 0,000 0,0 1 ofstream::~ofstream(void)
(ofstream.obj)
0,000 0,0 0,001 0,0 1 _$E23 (cerrinit.obj)
0,000 0,0 0,000 0,0 1 _$E23 (iostrini.obj)
0,000 0,0 0,001 0,0 1 _$E18 (iostrini.obj)
0,000 0,0 0,000 0,0 1 _$E23 (cininit.obj)
0,000 0,0 0,316 0,0 1 ofstream::open(char const
*,int,int) (ofstream.obj)
0,000 0,0 0,046 0,0 1 isStaleMate(void) (board.obj)
0,000 0,0 0,000 0,0 1 _$E20 (cininit.obj)
0,000 0,0 0,000 0,0 1 filebuf::filebuf(void)
(filebuf.obj)
0,000 0,0 0,006 0,0 1 _$E15 (data.obj)
0,000 0,0 0,000 0,0 1 _$E20 (iostrini.obj)
0,000 0,0 0,000 0,0 1 _$E17 (iostrini.obj)
0,000 0,0 0,000 0,0 1 _$E17 (cininit.obj)
0,000 0,0 0,000 0,0 1 _$E17 (cerrinit.obj)
0,000 0,0 0,000 0,0 1 _$E17 (data.obj)
0,000 0,0 0,000 0,0 1 _$E22 (cerrinit.obj)
0,000 0,0 0,000 0,0 1 _$E22 (cininit.obj)
0,000 0,0 0,000 0,0 1 _$E22 (iostrini.obj)
0,000 0,0 0,000 0,0 1 istream::~istream(void)
(istream.obj)
0,000 0,0 0,000 0,0 3 ostream::~ostream(void)
(ostream.obj)
0,000 0,0 0,000 0,0 1 test(void) (test.obj)
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.