Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Java versus C Speed Comparison

Author: Dieter Buerssner

Date: 08:15:27 01/08/03

Go up one level in this thread


On January 07, 2003 at 20:16:05, Matt Taylor wrote:

>If you read the C standard carefully, the size of short, int, and long were not
>defined when Kernighan and Ritchie worked on it. The int datatype is meant to be
>the optimal machine datatype, not necessarily 32-bits or whatever.

Unfortunately, my copy of K+R was stolen long time ago from my desk, so I cannot
check it anymore. I believe to remember, that the minimum ranges for the integer
type were already defined there. This has not changed until today. The ISO C99
Standard still defines the integer types by the minimum ranges (and some more
restrictions for unsigned types). In C99 there is also a type, that has
(practically speaking) at least 64 bits ([unsigned] long long).

When I first met the Alpha (I think almost 10 years ago), the DEC C compiler
already supported 64 bit longs (one could switch between 64 bit and 32 bit longs
by a compiler switch, similar for pointers - at least IIRC). At that time Gcc
already had the long long type.

Regards,
Dieter




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