Computer Chess Club Archives


Search

Terms

Messages

Subject: A free compiler you might not have heard about ...

Author: Dann Corbit

Date: 00:53:35 04/19/02


From:
http://www.digitalmars.com/

E:\tscp>sc -Jm -w -o+space -w- -6 -Nc tscp.c -mn
    setjmp(env);
               ^
search.c(37) : Warning 6: value of expression is not used
    if (pawn_rank[LIGHT][f] == 6);      /* pawn hasn't moved */
                                ^
eval.c(335) : Warning 7: possible extraneous ';'
    if (pawn_rank[DARK][f] == 1);
                               ^
eval.c(382) : Warning 7: possible extraneous ';'
link tscp,,,user32+kernel32/noi;


E:\tscp>tscp

Tom Kerrigan's Simple Chess Program (TSCP)
version 1.73, 2/11/01
Copyright 1997 Tom Kerrigan

"help" displays a list of commands.

tscp> bench

8  . r b . . r k .
7  p . . . . p p p
6  . p . q p . n .
5  . . . n . . N .
4  . . p P . . . .
3  . . P . . . P .
2  P P Q . . P B P
1  R . B . R . K .

   a b c d e f g h

ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4336 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4357 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4346 ms

Nodes: 550822
Best time: 4336 ms
Nodes per second: 127034 (863.6 MIPS)
tscp>

Compared with GCC:

$ gcc -W -Wall -ansi -pedantic -O3 tscp.c
In file included from tscp.c:5:
search.c: In function `reps':
search.c:237: warning: array subscript has type `char'
search.c:241: warning: array subscript has type `char'

dcorbit@DANNFAST e:/tscp
$ ./a

Tom Kerrigan's Simple Chess Program (TSCP)
version 1.73, 2/11/01
Copyright 1997 Tom Kerrigan

"help" displays a list of commands.

tscp> bench

8  . r b . . r k .
7  p . . . . p p p
6  . p . q p . n .
5  . . . n . . N .
4  . . p P . . . .
3  . . P . . . P .
2  P P Q . . P B P
1  R . B . R . K .

   a b c d e f g h

ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4366 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4350 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4323 ms

Nodes: 550822
Best time: 4323 ms
Nodes per second: 127416 (866.2 MIPS)
tscp>

Borland:
E:\tscp>bcc32 -6 -I"e:\Borland\Bcc55\include" -L"e:\Borland\Bcc55\lib" -Ox
tscp.c
Borland C++ 5.5 for Win32 Copyright (c) 1993, 2000 Borland
tscp.c:
Warning W8066 main.c 181: Unreachable code in function main
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland

E:\tscp>tscp

Tom Kerrigan's Simple Chess Program (TSCP)
version 1.73, 2/11/01
Copyright 1997 Tom Kerrigan

"help" displays a list of commands.

tscp> bench

8  . r b . . r k .
7  p . . . . p p p
6  . p . q p . n .
5  . . . n . . N .
4  . . p P . . . .
3  . . P . . . P .
2  P P Q . . P B P
1  R . B . R . K .

   a b c d e f g h

ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4597 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4607 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 4576 ms

Nodes: 550822
Best time: 4576 ms
Nodes per second: 120371 (818.3 MIPS)
tscp>

And then commercial compilers Intel:

E:\tscp>icl /nologo /G6 /Gr /Zp16 /ML /W4 /Gi /O2 /Ob2  /FD /G7 /GA /GF /Gs /O3
/QaxW /Qip /Qipo_S /Qwp_ipo /W5 /c tscp.c
icl: Command line warning: overriding '-G6' with '-G7'
icl: Command line warning: overriding '-O2' with '-O3'
icl: NOTE: The evaluation period for this product ends on 15-may-2002 UTC.
tscp.c
board.c(266): remark #810: conversion from "int" to "char" may lose significant
bits
      g->m.b.from = (char) from;
                    ^

board.c(267): remark #810: conversion from "int" to "char" may lose significant
bits
      g->m.b.to = (char) to;
                  ^

board.c(269): remark #810: conversion from "int" to "char" may lose significant
bits
      g->m.b.bits = (char) bits;
                    ^

board.c(287): remark #810: conversion from "int" to "char" may lose significant
bits
          g->m.b.from = (char) from;
                        ^

board.c(288): remark #810: conversion from "int" to "char" may lose significant
bits
          g->m.b.to = (char) to;
                      ^

board.c(289): remark #810: conversion from "int" to "char" may lose significant
bits
          g->m.b.promote = (char) i;
                           ^

board.c(290): remark #810: conversion from "int" to "char" may lose significant
bits
          g->m.b.bits = (char) (bits | 32);
                        ^

main.c(181): remark #111: statement is unreachable
      return 0;                   /* shouldn't get here */
      ^

main.c(266): remark #171: invalid type conversion: "int" to "void (__cdecl
*)(int)"
      signal(SIGINT, SIG_IGN);
                     ^

main.c(531): remark #810: conversion from "double" to "int" may lose significant
bits
      printf("Nodes per second: %d (%.1f MIPS)\n", (int) nps, mips);
                                                   ^


E:\tscp>tscp

Tom Kerrigan's Simple Chess Program (TSCP)
version 1.73, 2/11/01
Copyright 1997 Tom Kerrigan

"help" displays a list of commands.

tscp> bench

8  . r b . . r k .
7  p . . . . p p p
6  . p . q p . n .
5  . . . n . . N .
4  . . p P . . . .
3  . . P . . . P .
2  P P Q . . P B P
1  R . B . R . K .

   a b c d e f g h

ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3455 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3465 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3435 ms

Nodes: 550822
Best time: 3435 ms
Nodes per second: 160355 (1090.1 MIPS)
tscp>


MS VC++:
E:\tscp>cl /Ox /G6 tscp.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

tscp.c
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:tscp.exe
tscp.obj

E:\tscp>tscp

Tom Kerrigan's Simple Chess Program (TSCP)
version 1.73, 2/11/01
Copyright 1997 Tom Kerrigan

"help" displays a list of commands.

tscp> bench

8  . r b . . r k .
7  p . . . . p p p
6  . p . q p . n .
5  . . . n . . N .
4  . . p P . . . .
3  . . P . . . P .
2  P P Q . . P B P
1  R . B . R . K .

   a b c d e f g h

ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3445 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3435 ms
ply      nodes  score  pv
  1        130     20  c1e3
  2       3441      5  g5e4 d6c7
  3       8911     30  g5e4 d6c7 c1e3
  4     141367     10  g5e4 d6c7 c1e3 c8d7
  5     550822     26  c2a4 d6c7 g2d5 e6d5 c1e3
Time: 3455 ms

Nodes: 550822
Best time: 3435 ms
Nodes per second: 160355 (1090.1 MIPS)
tscp>



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.