Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: another simple c question

Author: Paul Clarke

Date: 04:09:49 07/21/04

Go up one level in this thread


On July 21, 2004 at 06:34:18, Daniel Shawul wrote:

>>>struct HASH_E
>>>{
>>>	HASHKEY checksum;
>>>	char     from;
>>>	char     to;
>>>	short    eval;
>>>	unsigned char    depth;
>>>	unsigned char    entry_threat_promote_seq;
>>>};
>>
>I changed the "struct member alignment" to 1 byte. Previously it was
>8 byte. And now it displays the correct size 14.
>Is there any efficiecy loss by changing the alignment?? If there is any
>i don't want to do that?

It depends on the architecture, but I think all modern processors will suffer a
performance hit from unaligned accesses. On the other hand you can now have a
larger hash table in the same memory, which might compensate.



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.