Re: Integers on 64-bit machines

Marco van de Voort <marcov@stack.nl>
Wed, 4 Jul 2007 11:21:26 +0000 (UTC)

          From comp.compilers

Related articles
Integers on 64-bit machines dwashington@gmx.net (Denis Washington) (2007-07-02)
Re: Integers on 64-bit machines torbenm@app-3.diku.dk (2007-07-04)
Re: Integers on 64-bit machines marcov@stack.nl (Marco van de Voort) (2007-07-04)
Re: Integers on 64-bit machines emailamit@gmail.com (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 anton@mips.complang.tuwien.ac.at (2007-07-05)
Re: Integers on 64-bit machines mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2007-07-05)
Re: Integers on 64-bit machines gah@ugcs.caltech.edu (glen herrmannsfeldt) (2007-07-05)
Re: Integers on 64-bit machines bobduff@shell01.TheWorld.com (Robert A Duff) (2007-07-05)
[19 later articles]
| List of all articles for this month |
From: Marco van de Voort <marcov@stack.nl>
Newsgroups: comp.compilers
Date: Wed, 4 Jul 2007 11:21:26 +0000 (UTC)
Organization: Stack Usenet News Service
References: 07-07-007
Keywords: arithmetic, design
Posted-Date: 04 Jul 2007 20:37:26 EDT

On 2007-07-02, Denis Washington <dwashington@gmx.net> 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.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.