comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Enumeration representation
Date: 02 Jan 2004 20:53:45 -0500
Date: 2004-01-02T20:53:45-05:00	[thread overview]
Message-ID: <wccy8sper12.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 3FF57910.60406@noplace.com

Marin David Condic <nobody@noplace.com> writes:

>...I wonder if it causes any harm by way of
> inefficiency in some respect?

IMHO, it *should* not cause harm (to efficiency) to say "for Enum use
(0,1,2);".  The compiler's logic *should* be, "if the representation,
whether chosen by the user, or chosen by default, is the normal
efficient one, then generate efficient code".  However, I have seen
compilers that think, "if the representation is chosen by the user,
then generate all kinds of lookup tables, otherwise do the efficient
thing".  That's bad, because if the user asks for exactly what the
compiler would have chosen by default, you get different and less
efficient code.

- Bob



  parent reply	other threads:[~2004-01-03  1:53 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-01 20:44 Enumeration representation Luke A. Guest
2004-01-01 21:45 ` Stephen Leake
2004-01-01 22:01   ` Luke A. Guest
2004-01-02  1:17     ` tmoran
2004-01-02  1:29     ` Stephen Leake
2004-01-02  3:10       ` Luke A. Guest
2004-01-02  2:46 ` Robert A Duff
2004-01-02  3:12   ` Luke A. Guest
2004-01-02 13:58   ` Marin David Condic
2004-01-02 21:39     ` Pat Rogers
2004-01-03 13:42       ` Marin David Condic
2004-01-03  1:53     ` Robert A Duff [this message]
2004-01-02 20:52   ` Randy Brukardt
2004-01-02 21:05     ` Luke A. Guest
  -- strict thread matches above, loose matches on Subject: below --
1999-09-10  0:00 Alex
1999-09-10  0:00 ` David C. Hoos, Sr.
1999-09-10  0:00   ` Robert Dewar
1999-09-10  0:00 ` Matthew Heaney
1999-09-10  0:00   ` Robert Dewar
1999-09-10  0:00 ` Keith Thompson
1999-09-11  0:00   ` Robert Dewar
1999-09-11  0:00     ` Keith Thompson
1999-09-12  0:00       ` Bryce Bardin
1999-09-13  0:00         ` Robert Dewar
1999-09-13  0:00           ` Keith Thompson
1999-09-13  0:00       ` Robert Dewar
1999-09-12  0:00         ` Keith Thompson
1999-09-13  0:00           ` Robert Dewar
1999-09-13  0:00             ` Ted Dennison
1999-09-13  0:00             ` Keith Thompson
1999-09-14  0:00               ` Robert Dewar
1999-09-13  0:00         ` Robert A Duff
1999-09-13  0:00           ` Robert Dewar
1999-09-10  0:00 ` Ted Dennison
1999-09-10  0:00   ` Robert Dewar
1999-09-13  0:00     ` Ted Dennison
1999-09-13  0:00 ` Alex
replies disabled

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