Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fruit 1.0 64-bit

Author: Robert Hyatt

Date: 07:25:29 03/29/04

Go up one level in this thread


On March 28, 2004 at 23:35:08, Russell Reagan wrote:

>On March 28, 2004 at 12:29:42, Eugene Nalimov wrote:
>
>>There are situations when VC can hoist signed lengthening convert out of the
>>loop, but cannot hoist unsigned convert. Reason is C/C++ semantics -- according
>>to the Standard signed overflow results in undefined behavior, so compiler can
>>assume that there would be no overflow.
>
>Is there any penalty for copying different data sizes? Example:
>
>unsigned char  one_byte;   // sizeof(unsigned char)  == 1
>unsigned short two_bytes;  // sizeof(unsigned short) == 2
>unsigned long  four_bytes; // sizeof(unsigned long)  == 4
>
>one_byte = four_bytes;
>one_byte = two_bytes;
>two_bytes = one_byte;
>two_bytes = four_bytes;
>four_bytes = one_byte;
>four_bytes = two_bytes;
>
>Are there any penalties for any of the above copies?


signed-shorter copied to signed-longer requires a sign extension...  Others are
ok and unsigned doesn't have that problem at all...



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.