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!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Performance of element access in Vector Date: Mon, 19 Jan 2009 16:32:32 +0000 Message-ID: References: <0a8baaf0-19f7-40c0-a041-884e93fa7020@w39g2000prb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net zJcaSGy3AezvmIxtFvSTmwXqzAyhP2eIdM5yHfi++qDtUdI78J Cancel-Lock: sha1:Siljhis87C+qy5AbcIdW9UyNekY= User-Agent: Microsoft-Entourage/12.14.0.081024 Thread-Topic: Performance of element access in Vector Thread-Index: Acl6U4bYs48R39qzr0GfWagoEB9RsA== Xref: g2news1.google.com comp.lang.ada:3444 Date: 2009-01-19T16:32:32+00:00 List-Id: On 19/01/2009 03:23, in article c8a97381-667c-4fda-8a1b-b4035f4281b8@o40g2000yqb.googlegroups.com, "george.priv@gmail.com" wrote: > > Results came as: > > raw array : 00:00:09.82 > direct index : 00:00:23.02 > Update_Element and index : 00:01:29.96 > direct cursor : 00:02:22.65 > Update_Element and cursor: 00:03:36.51 > Iterate : 00:02:13.03 On my very modest MacBook Pro, using: GNATMAKE 4.4.0 20080329 (experimental) [trunk revision 133715] With command: gnatmake -funwind-tables -g -gnatfl05wawCwl -gnatNnp \ -falign-loops=24 -fno-stack-check -funroll-loops -fsched-interblock -O3 A \ -largs -lgcc_eh -bargs -Sev I get: raw array : 00:00:08.44 direct index : 00:00:11.06 Update_Element and index : 00:00:50.31 direct cursor : 00:00:20.51 Update_Element and cursor: 00:00:56.03 Iterate : 00:01:40.47 So it seems to be question of compiler version and options. -- Bill Findlay chez blueyonder.co.uk