comp.lang.ada
 help / color / mirror / Atom feed
From: John Perry <john.perry@usm.edu>
Subject: Re: Performance of records with variant parts
Date: Fri, 26 Mar 2021 08:44:54 -0700 (PDT)	[thread overview]
Message-ID: <3b3ff9aa-26b9-4da7-82de-a5f6c1980335n@googlegroups.com> (raw)
In-Reply-To: <86h7kyapsn.fsf@stephe-leake.org>

On Friday, March 26, 2021 at 10:38:22 AM UTC-5, Stephen Leake wrote:
> As a workaround, you can suppress checks in that block of code: 
> 
> pragma Suppress (Discriminant_Check); 

Sorry, I should have updated earlier. I discovered tried this a couple of nights ago, and it did nothing to help. I checked the IR and that did change, so it certainly did something; it just didn't improve the performance as I expected. It has made me think that perhaps the problem is elsewhere, but I have no idea where.

So, thank you very much for remembering this and getting back to me! But by now I've concluded that gprof misled me. Wouldn't be the first time. The difference in performance is real, but must be caused elsewhere. I don't even feel confidence submitting an enhancement request to AdaCore because by now I have no idea what the problem is.

For what it's worth: I reimplemented it a fourth time as tagged records, and while the code is quite a bit wordier, it was more efficient than variant records.

(I also tried examining the generated assembly code, but I'm not strong enough in assembly to work that out.)

  reply	other threads:[~2021-03-26 15:44 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
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 [this message]
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