Author: Russell Reagan
Date: 20:35:08 03/28/04
Go up one level in this thread
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?
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.