Author: Ed Schröder
Date: 04:05:02 01/13/02
Go up one level in this thread
On January 13, 2002 at 05:35:06, Tom Kerrigan wrote: >On January 13, 2002 at 05:10:44, David Dory wrote: > >>On January 13, 2002 at 01:53:02, emerson tan wrote: >> >>>What's the best computer language to program a chess software in terms of speed >>>of execution? Is it FORTRAN? C++? C? or any other language I dont know? What are >>>the advantages and disadvantages of each language? What languages does FRITZ, >>>SHREDDER, REBEL, TIGER, JUNIOR, HIARCS, CRAFTY, CHESSMATER AND OTHER FAMOUS >>>PROGRAMS USE? >>> >>>Thanks >> >>Most of the top amateur and pro programs are written in C. Many sprinkle in some >>assembly language in very time-critical sections. Some very good programs have >>been written in assembly - which is blazingly fast. Unfortunately when the > >Assembly used to be blazingly fast, back when compilers weren't very good and >microprocessors were simpler, but it has lost a lot of its advantages. > >It is now extremely difficult to write assembly that's faster than compiled C. >There are so many rules about how to schedule instructions and align data for >good performance that only a computer can keep up with them all. I've >participated in contests with highly regarded assembly language programmers and >Visual C++ usually outperforms their hand-written code by ~20%. This is often >because the humans forget or aren't aware of some obscure rule about aligning >data or instructions. > >Another problem with assembly is that it's hard to keep current. Assembly that >ran well on Pentiums does not necessarily run well on Pentium Pros. I know that >Fritz was bitten by this problem--the engine was written in assembly and >optimized for the Pentium when the PPro came out, and it actually ran slower on >an equally-clocked PPro. A C program can just be recompiled with a PPro-suited >compiler and get performance gains from the new processor. > >-Tom I have to disagree, I have a MSVC6 version of Rebel and it runs 30% slower than the ASM version. Ed
This page took 0.02 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.