Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: C++ question (OT)

Author: Heiner Marxen

Date: 15:43:32 01/21/01

Go up one level in this thread


On January 21, 2001 at 17:20:11, Paul wrote:

>On January 21, 2001 at 12:30:21, Larry Griffiths wrote:
>
>>The optimizing capability of the BCB compiler sucks!  My inline asm has extra
>>NOP instructions that do not serve any purpose other than to slow my code down.
>>BCB 5 has severe alignment problems when using __int64.  It does not align them
>>to quadwords so I have to do it by hand.  MMX takes bad performance hits when
>>the variables are not aligned on quadwords.  This also applys to creating
>>instances of classes.  I created a seperate assembler module at one time that
>>contained "Align" statements, but the ILINK32 seems to ignore these and aligns
>>everything to doubleword boundrys.
>
>Hmmm ... I didn't know BCB had alignment problems. I use int64's for hashing.
>Haven't noticed a big speed penalty for that,

You may have been just lucky ;-)


> is it only a problem in
>combination with MMX or is it more general if I understand you right?
>
>>I seem to get a lot better performance using the MMX instructions.  MMX
>>registers cannot be tested for values since they don't set conditions codes.  I
>>could increase performance if this was available.  They also force the
>>destinations to be a MMX register, so you have to load a register, perform an
>>operation, then store it.  This is also a performance hit.
>
>But in return you've got a lot more registers too play with right? But if
>you can't test on conditions their use must be very limited? Just And/Or etc?
>
>>I really liked the IBM 370 instruction set.  It has 16 registers and was very
>>logically designed.
>
>Right, that's what I like, not these incomprehensible Intel chips :)
>
>I think I'm not gonna study assembler any time soon. So no bitboards for me!
>I do want to change my GNU style movegen to the 0x88 one soon. Only
>don't like the fact that ao the history array gets a lot bigger that way.

At the cost of some instructions you can address it compactly by mapping
the 0x88 indexes back to the compact values, like:

#define map88(x)  (((x) & 07) | (((x)>>1) & 070))

Heiner



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.