Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: a dumb question

Author: Bryan Hofmann

Date: 04:26:18 04/19/04

Go up one level in this thread


On April 19, 2004 at 03:04:13, Russell Reagan wrote:

>On April 18, 2004 at 20:12:03, Mathieu Pagé wrote:
>
>>Your right, managed code is not suitable for chess engines, but this compiler,
>>depending on the command line argument, can compile into managed code or into
>>native code.
>
>Any time I mention the speed reductions that come with managed code, I have
>people tell me I am wrong, "no, the managed code will run just as fast as the
>native code." They tell me that since the code will be compiled natively via the
>JIT compiler, it will run natively, and should run no slower. They go into a lot
>of other details about how the bounds checking should have negligble overhead,
>since the bounds will virtually never be invalid, so the branch prediction
>should have no problem with that, and other things that make good sense,
>theoretically. However, testing it shows a different story. Here is what I get
>when I compile Crafty as a native program, and then as a managed program.


What were the compiler option switches used here?


>
>--------
> Native
>--------
>
>unable to open book file [./book.bin].
>book is disabled
>unable to open book file [./books.bin].
>
>Crafty v19.10
>
>White(1): bench
>Running benchmark. . .
>......
>Total nodes: 102625951
>Raw nodes per second: 1115499
>Total elapsed time: 92
>SMP time-to-ply measurement: 6.956522
>White(1):
>
>---------
> Managed
>---------
>unable to open book file [./book.bin].
>book is disabled
>unable to open book file [./books.bin].
>
>Crafty v19.10
>
>White(1): bench
>Running benchmark. . .
>......
>Total nodes: 102625951
>Raw nodes per second: 670757
>Total elapsed time: 153
>SMP time-to-ply measurement: 4.183007
>White(1): quit
>
>So the managed version runs at about 60% of the speed of the native version. Not
>too great.



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.