comp.lang.ada
 help / color / mirror / Atom feed
From: "Davide" <ppp@ppp.it>
Subject: data types & efficiency
Date: Fri, 5 Mar 2004 09:02:56 +0100
Date: 2004-03-05T09:02:56+01:00	[thread overview]
Message-ID: <c29c7h$hbq$1@e3k.asi.ansaldo.it> (raw)

hello everybody,

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.

I think considerations should be made about efficiency and memory occupation
*but* (maybe) taking into account memory alignment (that could vanify
considerations made at point 1...maybe).

Waiting for your opinions,

thanks in advance.






             reply	other threads:[~2004-03-05  8:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-05  8:02 Davide [this message]
2004-03-05  9:23 ` data types & efficiency Vinzent 'Gadget' Hoefler
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