Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Fruit 1.0 64-bit

Author: Russell Reagan

Date: 09:09:26 03/26/04

Go up one level in this thread


On March 26, 2004 at 09:15:12, Fabien Letouzey wrote:

>Would there be a reason why, for instance, 16-bit integers would be slower in
>64-bit mode?

Software Optimization Guide for AMD Athlon™ 64 and AMD Opteron™

2.22 Using Unsigned Integers for 32-Bit Array Indices

Optimization
When using a 32-bit variable as an array index, declare the variable as an
unsigned integer instead of a signed integer.

Application
This optimization applies to 64-bit software.

Rationale
When performing 64-bit address arithmetic, the compiler must insert an
additional instruction into the object code to sign-extend a signed 32-bit
integer, which reduces performance; no additional instruction is necessary to
zero-extend an unsigned 32-bit integer because the processor performs
zero-extension automatically. (There is no performance penalty for using 64-bit
variables—either signed or unsigned—as array indices.)



This page took 0.01 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.