From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cf34599caf2fa938 X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: GNAT function calling overhead Date: 1995/04/07 Message-ID: #1/1 X-Deja-AN: 100070432 references: <3m0nv1$pv2@nef.ens.fr> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1995-04-07T00:00:00+00:00 List-Id: Kenneth says: " This has little to do with function call overhead per se. The problem is that GNAT produces ineffient code for subscripting operations on Matrix variables when the bounds of the matrix are not known at compile time. GNAT does somewhat better when the matrix is not passed as an argument; hence the performance improvement from inlining." I don't see this, in the inner loop, with checks turned off, the lower bound calculation should be moved out of the loop. I can't yet duplicate the reported results. I asked for the code but did not get it yet. Certainly for the straightforward way of computing matrix multiplciation for example, there is no extra overhead in the inner loop in the GNAT code, at least on the i386 where I am looking at the assembly code. In my experience, it is futile to guess what might be behind such differences without the actual code at hand, there can be MANY variables. In future, if people want to discuss performance differences between Ada and C on particular code, it would be useful to post the alledgedly comparable source code.