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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bb7cc916bd63ab43 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Performance of element access in Vector Followup-To: comp.lang.ada Date: Fri, 23 Jan 2009 15:55:24 +0100 Message-ID: <6tu43dFcibgkU1@mid.individual.net> References: <0a8baaf0-19f7-40c0-a041-884e93fa7020@w39g2000prb.googlegroups.com> <97268050-5091-4428-8b48-faf5a14eda25@s9g2000prg.googlegroups.com> <497764a4$0$30231$9b4e6d93@newsspool1.arcor-online.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Trace: individual.net bM/A+Yr6P9CH6gGvUIPmTwNEM1tawtTUggSU+v2qwWiPKDYEo= Cancel-Lock: sha1:25DixwxZmBGblzaRzoIMHP1lqGk= User-Agent: KNode/0.99.01 Xref: g2news1.google.com comp.lang.ada:3483 Date: 2009-01-23T15:55:24+01:00 List-Id: Georg Bauhaus wrote: > Maciej Sobczak schrieb: > >> The problem here is that the compiler does not inline Update_Element/ >> Query_Element callbacks. Safety and performance are not in conflict >> here, it is just a quality of implementation issue. >> You can have both. > > FWIW, if Iterate/Process is made a generic procedure as > in the original AI-302, and Increment is made a library > level procedure, then GNAT confirms, in a sense, > that there might be a quality of implementation issue: > > raw array : 00:00:29.78 > raw array process : 00:01:06.74 > raw array generic : 00:00:29.78 Do you mean, IIUC, that if 'process' where properly inlined, the timing would be same for the three instances? That would be nice.