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,10444cff97404845 X-Google-Attributes: gid103376,public From: Gautier Subject: Re: C like op= proposal Date: 1999/08/18 Message-ID: <37BA9AFB.257BB730@Maths.UniNe.CH>#1/1 X-Deja-AN: 514173469 Content-Transfer-Encoding: 7bit References: <37B7D172.DCE02FFA@Maths.UniNe.CH> <87emh2l218.fsf@antinea.enst.fr> Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-18T00:00:00+00:00 List-Id: > Gautier> a(b(c,d+e(f,g)).h(i,j)) := a(b(c,d+e(f,g)).h(i,j)) + 1; > Gautier> which can be horribily long and unlikely to be catched by the > Gautier> optimizer -> 2x too slow (at least: the extra code makes a > Gautier> penalty for processor cache). > Where did you get the impression that the optimizer would miss this? > [ the proof that GNAT with -O3 (in fact even -O2) does see it and puts an "intrinsic" Inc( a(b(c,d+e(f,g)).h(i,j)) ); ] NB: tested with the generic, inlined Inc procedure the assembler output is exaclty the same :-) Subsidiary question: are other optimizers so good (ObjectAda, Janus,...) ? [Did I ask the same question 1 year ago ? I'll check in DN...] -- Gautier -------- http://members.xoom.com/gdemont/