From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Performance of records with variant parts Date: Mon, 22 Mar 2021 18:32:37 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <07a56dcc-9e17-49b2-a980-3a5a2d265cedn@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 22 Mar 2021 17:32:37 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="b53df4a440428053084cdf916ac37f08"; logging-data="13827"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DOFKqgXUikpyCzlFCnLOVPhA830yc+00=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cancel-Lock: sha1:yS0kpRq7ogkJhQ2muGM0FnopJnA= In-Reply-To: <07a56dcc-9e17-49b2-a980-3a5a2d265cedn@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61628 List-Id: On 3/22/21 6:02 PM, John Perry wrote: > > | case obj.kind is > | when Sphere => > | -- do stuff > | when Plane => > | -- do other stuff > | when None => > | null; > | end case; > > Is there a reason that the record with variant parts runs so much slower? I can make the complete source available if need be. 1. Why is Surface a discriminant? 2. What are the quantitative timing requirements for the program? Does the difference affect whether or not they are met? 3. What is the declaration of Obj? -- Jeff Carter "One day he told me he was a gynecologist. He couldn't speak no foreign languages." Take the Money and Run 147