TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Subject:
From:
"Borgia, William M." <[log in to unmask]>
Reply To:
Borgia, William M.
Date:
Mon, 18 Oct 1999 09:52:32 -0400
Content-Type:
text/plain
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.
>
        [Borgia:]

        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

ATOM RSS1 RSS2