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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,229a77b902096176,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-10 13:01:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!washdc3-snf1!news.gtei.net!cyclone1.gnilink.net!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!news.stealth.net!news.stealth.net!fr.clara.net!heighliner.fr.clara.net!proxad.net!wanadoo.fr!not-for-mail From: "Etienne Baudin" Newsgroups: comp.lang.ada Subject: fastest data structure Date: Tue, 10 Dec 2002 22:01:03 +0100 Organization: Wanadoo, l'internet avec France Telecom Message-ID: NNTP-Posting-Host: atoulouse-105-1-4-248.abo.wanadoo.fr X-Trace: news-reader12.wanadoo.fr 1039554063 3658 80.11.196.248 (10 Dec 2002 21:01:03 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 10 Dec 2002 21:01:03 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:31654 Date: 2002-12-10T21:01:03+00:00 List-Id: Hello, I'd like to know which of these 2 data structures is the fastest to proceed : an simple array of "My_type" (My type is a record...) or a liked liste of "My_Type" with these definitions A : array (integer range <>) of My_Type vs type ptr is access cell type cell is record comp : My_Type; next : ptr; end record; for i in A'range loop processing A(i) end loop; while (p != null) loop process p.comp; p := p.next; end loop; Which of the loops is supposed to be the fastest ? Each of the loop should run between 1000 and 10_000 times (faces of a 3d object) many (60 expected) times per sec, that's why I try to get the best performances. Thanks Etienne Baudin