comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: Performance of records with variant parts
Date: Mon, 22 Mar 2021 20:31:43 +0100	[thread overview]
Message-ID: <s3arav$3mf$1@dont-email.me> (raw)
In-Reply-To: <23dcce3e-0db1-4417-a5d1-a05f03f74464n@googlegroups.com>

On 3/22/21 6:49 PM, John Perry wrote:
> 
> This is a raytracing program. There are no particular timing requirements, but if I wanted a larger image with more objects things would get ugly. This is really more a matter of my curiosity.

If you have no timing requirements, then you don't care how long it takes and 
have no issue.

> 
> Obj is an "in" parameter to a function. Do you need more than that?

Yes.

What compiler and optimization option are you using? I would expect any compiler 
(except GNAT at -O0) to optimize away any discriminant checks on direct accesses 
to variant components in the branches of the case statement.

Is Obj passed to any subprograms from the branches of the case statement? Are 
any variant components accessed outside of the case statement?

-- 
Jeff Carter
"One day he told me he was a gynecologist. He
couldn't speak no foreign languages."
Take the Money and Run
147

  parent reply	other threads:[~2021-03-22 19:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 17:02 Performance of records with variant parts John Perry
2021-03-22 17:32 ` Jeffrey R. Carter
2021-03-22 17:49   ` John Perry
2021-03-22 17:54     ` John Perry
2021-03-22 19:31     ` Jeffrey R. Carter [this message]
2021-03-22 22:11       ` John Perry
2021-03-23  9:31         ` Jeffrey R. Carter
2021-03-23 14:27           ` Simon Wright
2021-03-23 23:00           ` John Perry
2021-03-23 23:27             ` Jeffrey R. Carter
2021-03-26 15:38               ` Stephen Leake
2021-03-26 15:44                 ` John Perry
2021-03-30  7:12                   ` Emmanuel Briot
2021-04-01  0:03                     ` John Perry
2021-04-01  6:45                       ` Emmanuel Briot
2021-04-01 13:38                       ` Niklas Holsti
2021-04-02 16:07                         ` John Perry
2021-03-22 17:39 ` Dmitry A. Kazakov
2021-03-22 17:45   ` John Perry
2021-03-22 18:07     ` Dmitry A. Kazakov
2021-03-22 18:23       ` John Perry
2021-03-22 20:30         ` Dmitry A. Kazakov
2021-03-22 18:59 ` Niklas Holsti
2021-03-22 21:54   ` John Perry
replies disabled

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