TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: "Borgia, William M." <[log in to unmask]>
Date: Mon, 18 Oct 1999 09:52:32 -0400
Content-Type: text/plain
MIME-Version: 1.0
Reply-To: "Borgia, William M." <[log in to unmask]>
Parts/Attachments: text/plain (16 lines)
> My code looks much clearer if I use expressions like 2**4 instead of 16,
> but
> then there is the question of execution time also. I don't want the
> calculation to take place over and over again, since the function is
> called
> quite often.

        You may want to try declaring the 2**4 expression as a constant,
which guarantees a static value at compile time regardless of the
implementation or level of optimization.  I hate code that relies on a
particular optimizer anyway.

        Bill Borgia