comp.lang.ada
 help / color / mirror / Atom feed
From: Vinzent 'Gadget' Hoefler <nntp-2004-03@t-domaingrabbing.de>
Subject: Re: data types & efficiency
Date: Fri, 05 Mar 2004 10:23:49 +0100
Date: 2004-03-05T10:23:49+01:00	[thread overview]
Message-ID: <5ohg40ls073v1b5d8idail4t365f57l8os@jellix.jlfencey.com> (raw)
In-Reply-To: c29c7h$hbq$1@e3k.asi.ansaldo.it

Davide wrote:

>speaking in general, if I have a *XX-bit* architecture for which I'm
>developing software in Ada, and I need to declare some *scalar* (not records
>nor arrays etc.) variable eg. integer: what should be better to do:
>
>1) always declare that variable as the *smallest* data type that will hold
>the highest value of its possible range (example: if it can assume values
>from 0 to 150 then declare it as an 8-bit integer);
>
>2) tend to declare the variable as the machine "native" data type,  i.e.
>XX-bit represented.

3) Declare the type by specifying its range and let the compiler
figure out what could be more efficient on the hardware.


Vinzent.



  reply	other threads:[~2004-03-05  9:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05  8:02 data types & efficiency Davide
2004-03-05  9:23 ` Vinzent 'Gadget' Hoefler [this message]
2004-03-05  9:57   ` Davide
2004-03-05 12:00     ` Vinzent 'Gadget' Hoefler
2004-03-05 15:54       ` Davide
2004-03-05 20:53         ` tmoran
2004-03-08  9:28           ` Davide
2004-03-08  8:58         ` Vinzent 'Gadget' Hoefler
2004-03-08 10:53           ` Davide
2004-03-08 15:27           ` Robert I. Eachus
2004-03-05 10:22 ` Jean-Pierre Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox