Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Programming: speed of my engine.

Author: Matthias Gemuh

Date: 13:24:14 03/16/04

Go up one level in this thread


On March 16, 2004 at 15:04:53, Matthias Gemuh wrote:






column 1 => Perft (see original post)
column 2 => Perft + Eval
column 3 => Perft + Eval + MoveOrdering


rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/
PerftPly = 3      PerftPly = 3      PerftPly = 3
nCount = 9322     nCount = 9322     nCount = 9322
nps = 932200      nps = 466100      nps = 310733
rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/
PerftPly = 4      PerftPly = 4      PerftPly = 4
nCount = 206603   nCount = 206603   nCount = 206603
nps = 1147794     nps = 794626      nps = 712424
rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/rnbqkbnr/pppppppp/
PerftPly = 5      PerftPly = 5      PerftPly = 5
nCount = 5072212  nCount = 5072212  nCount = 5072212
nps = 1249313     nps = 897736      nps = 761593
r3k2r/p1ppqpb1/bn2r3k2r/p1ppqpb1/bn2r3k2r/p1ppqpb1/bn2- 0 1
PerftPly = 3      PerftPly = 3      PerftPly = 3
nCount = 99949    nCount = 99949    nCount = 99949
nps = 1249362     nps = 999490      nps = 713921
r3k2r/p1ppqpb1/bn2r3k2r/p1ppqpb1/bn2r3k2r/p1ppqpb1/bn2- 0 1
PerftPly = 4      PerftPly = 4      PerftPly = 4
nCount = 4185552  nCount = 4185552  nCount = 4185552
nps = 1260708     nps = 1043778     nps = 783811
8/PPP4k/8/8/8/8/4K8/PPP4k/8/8/8/8/4K8/PPP4k/8/8/8/8/4K
PerftPly = 4      PerftPly = 4      PerftPly = 4
nCount = 94715    nCount = 94715    nCount = 94715
nps = 861045      nps = 728576      nps = 631433
8/PPP4k/8/8/8/8/4K8/PPP4k/8/8/8/8/4K8/PPP4k/8/8/8/8/4K
PerftPly = 5      PerftPly = 5      PerftPly = 5
nCount = 1840260  nCount = 1840260  nCount = 1840260
nps = 1082505     nps =  863971     nps = 724511
8/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R3
PerftPly = 4      PerftPly = 4      PerftPly = 4
nCount = 46255    nCount = 46255    nCount = 46255
nps = 1156375     nps = 660785      nps = 660785
8/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R3
PerftPly = 5      PerftPly = 5      PerftPly = 5
nCount = 720879   nCount = 720879   nCount = 720879
nps = 1310689     nps = 948525      nps = 758820
8/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R38/2p5/3p4/KP5r/1R3
PerftPly = 6      PerftPly = 6      PerftPly = 6
nCount = 11750962 nCount = 11750962 nCount = 11750962
nps = 1304213     nps = 975993      nps = 773598













>
>
>
>I am trying to find out why my engine is 6...10 times slower than others at
>runtime (got no profiler).  Is the speed of this Perft() acceptable on 2.0 GHz ?
>Note that attack boards and hash keys are also calculated/updated.
>
>
>
>void Perft(int nPerft, int nPly, *nCount, nSideToMove, ChsStrct, nMethod)
>{
>    if (nPerft <= 0) return;
>    CalculateAttackBoards(ChsStrct, &AtkInfo1);
>    GenerateMoves(ChsStrct, nSideToMove, nMoveOffset, &AtkInfo1);
>    for (i= 0; i < ChsStrct->MoveCount; i++) {
>        Move = ChsStrct->MoveList[nMoveOffset+i];
>        if (!MiniMakeMove(ChsStrct, Move, true)) continue;
>        *nCount += 1;
>        Perft(nPerft-1, nPly+1, nCount, nOtherSide, ChsStrct, nMethod);
>        MiniUnmakeMove(ChsStrct, Move);
>    }
>}
>
>
>rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
>PerftPly = 3
>nCount = 9322
>nps = 932200
>rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
>PerftPly = 4
>nCount = 206603
>nps = 1147794
>rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
>PerftPly = 5
>nCount = 5072212
>nps = 1249313
>r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
>PerftPly = 3
>nCount = 99949
>nps = 1249362
>r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
>PerftPly = 4
>nCount = 4185552
>nps = 1260708
>8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
>PerftPly = 4
>nCount = 94715
>nps = 861045
>8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
>PerftPly = 5
>nCount = 1840260
>nps = 1082505
>8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
>PerftPly = 4
>nCount = 46255
>nps = 1156375
>8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
>PerftPly = 5
>nCount = 720879
>nps = 1310689
>8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - - 0 1
>PerftPly = 6
>nCount = 11750962
>nps = 1304213



This page took 0 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.