|Integers on 64-bit machines email@example.com (Denis Washington) (2007-07-02)|
|Re: Integers on 64-bit machines firstname.lastname@example.org (2007-07-04)|
|Re: Integers on 64-bit machines email@example.com (Marco van de Voort) (2007-07-04)|
|Re: Integers on 64-bit machines firstname.lastname@example.org (Amit Gupta) (2007-07-05)|
|Re: Integers on 64-bit machines DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-07-05)|
|Re: Integers on 64-bit machines email@example.com (2007-07-05)|
|Re: Integers on 64-bit machines firstname.lastname@example.org (Dmitry A. Kazakov) (2007-07-05)|
|Re: Integers on 64-bit machines email@example.com (glen herrmannsfeldt) (2007-07-05)|
|Re: Integers on 64-bit machines bobduff@shell01.TheWorld.com (Robert A Duff) (2007-07-05)|
|[19 later articles]|
|From:||Marco van de Voort <firstname.lastname@example.org>|
|Date:||Wed, 4 Jul 2007 11:21:26 +0000 (UTC)|
|Organization:||Stack Usenet News Service|
|Posted-Date:||04 Jul 2007 20:37:26 EDT|
On 2007-07-02, Denis Washington <email@example.com> wrote:
> I'm currently developing a little C-like programming language as a
> hobby project. After having implemented the basic integral integer
> types like known from Java/C# (with fixed sizes for each type), I
> thought a bit about 64-bit machines and wanted to ask: if you develop
> on a 64-bit machine, would it be preferable to still leave the
> standard integer type ("int") 32-bit, or would it be better to have
> "int" grow to 64 bit?
It depends on the hardware (the specifics of the 64-bit architecture).
If the architecture heavily penalizes 32-bit access, then a 64-bit
value is better. If not, enlarging the INT type will only blow up the
average datastructure (and decrease cache utilization)
So you can have two 64-bit architectures where this differs. The key
thing is to keep some type equivalent to pointers. (and maybe another
for differences between pointers if you are very strict).
This is also the current situation currently for existing native compilers
Search for the terms LLP64, ILP64 and LP64 to find more of these discussions.
Return to the
Search the comp.compilers archives again.