Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: assembler vs. C

Author: Bo Persson

Date: 10:50:19 11/08/99

Go up one level in this thread


On November 08, 1999 at 12:54:47, Bruce Moreland wrote:

>On November 08, 1999 at 06:02:53, leonid wrote:
>
>>On November 08, 1999 at 04:40:26, Bruce Moreland wrote:
>>
>>>On November 07, 1999 at 22:58:55, leonid wrote:
>>>
>>>>If you write your chess program only for fun, use every language that you could
>>>>like. But if you expect that "others" should observe your happiness, use
>>>>Assembler. Only this language will give your game extra ply over others. It will
>>>>naturally induce into your game some extra glamoring brillances able to capture
>>>>the attention of human eyes. And since the human is a social animal that crave
>>>>for attention, Assembler is the only natural language for him to express
>>>>himself.
>>>
>>>Assembler won't yield an extra ply.
>>>
>>>bruce
>>
>>If extra ply signify game that goes five or six time more rapidly, Assembler
>>give you just this.
>>
>>Leonid.
>
>I don't know what compiler you are talking about, but this isn't true for
>anything I have seen.  I've looked a the compiler generated code in the case of
>my own program, and some of the functions are in my opinion unimprovable.  In
>other cases the improvement is so slight as to be not worth the trouble.

I suspect he is talking about an old 16-bit Turbo Pascal, where this kind of
speed up *was* possible. (The Turbo was in compile speed, not in execution
speed).

I agree that a good compiler (like MSVC) produces code on par with a good
assembly coder. I too have studied the code listings and tried to improve it.
Generally, there are only one or two instructions that can be tweeked, and the
speed up have never been large enough to be really measureable.

>When I ran 16-bit Windows I had some assembly code and it helped, because the
>compiler was doing dumb things with segment registers.  But there are no segment
>registers these days, it's all flat model, and the compiler has an easier time.
>It also seems to try very hard to use multiple pipes properly, and to avoid
>register stalls.
>
>It is possible that I could go faster if I designed specifically for assembly
>code, but I still think that 5-6X is way beyond anything I could hope to
>accomplish.
>
>bruce


Bo Persson
bop@malmo.mail.telia.com



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.