Author: Amir Ban
Date: 10:01:37 07/14/98
Go up one level in this thread
On July 14, 1998 at 12:24:08, Christophe Theron wrote: >On July 13, 1998 at 22:45:02, SEAN EVANS wrote: > >>Hello Amir Ban, >> >>Will the next verision of Junior be called 5.32 making it a True 32 bit Chess >>engine which can utilize the larger BUS. >> >>Here is a good Newbie question for you! Is it faster for a Chess engine like >>Rebel or Mchess to run under a DOS system or a program like CM5500 to run under >>a 32 bit system??? It would seem to me the "Newbie" that 32 bits is faster than >>16 bits. > >Chess Tiger is a 32 bits application and exists both in DOS and Win95 versions. > >The DOS version is compiled with the (free) Gnu C Compiler, which includes a DOS >extender. The extender makes 32 bits DOS applications possible. This version can >be run under pure DOS, or in a Win95 DOS box. > >The Win95 version can be compiled either with Microsoft C Compiler (version 4 or >5) or with the Borland Compilers. The fastest engine is obtained by using the >Microsoft Visual C version 5. > >Running the DOS version under pure DOS is as fast as running the Win95 version >under Win95. > >That is to say: the environment you are using (DOS or Windows) makes very little >difference. Pure DOS should theorically be slightly faster than Windows, because >of Windows real time multitasking overhead. In pratice, the MSVC5 compiler is >slightly better in producing optimized code, and I see no difference between DOS >and Windows. > >So I keep using DOS for my competition engine, because with the same amount of >available RAM I can get more hash (Windows is not eating memory). > >If I released Tiger, I would certainly do it as a Windows application, because I >don't want people to say: "Hey, this is a crappy DOS program!". Yeah, some >people really react like that... > >And one more thing: I'm quite sure that Tiger would be a little bit faster if it >was a 16 bits (DOS or Windows) application. So why did I use 32 bits? Because it >is a little bit trickier to program a large application in 16 bits, and I was a >little bit too lazy for that. > >As you see, things are not as simple as: "16 bits DOS programs suck". > > > Christophe This is not too clear to me. Is your program a 16-bit program or a true 32-bit program ? The division is not sharp because even in real-mode you can use many of the processors 32-bit features, such as the extended common registers. So I will clarify: A true 32-bit program uses a 32-bit stack and has ESP as the stack pointer. A 16-bit program uses a 16-bit stack and SP as the stack pointer. A DOS program can't possibly be a true 32-bit program. If you are using a DOS extender, then you are really not really using DOS. The extender creates an environment that is really a different O/S, and the DOS interface is a simulation. If the extender is 32-bit flat (some extenders are not), and the program is 32-bit, then it's just as good as running on Win32. You can use the full instruction set and addressing modes of the CPU only in 32-bit programs. This, and the fact that Intel is optimizing for years for 32-bit, makes 32-bit programs generally faster, sometimes much faster. Amir
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.