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=2.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HELO_NO_DOMAIN,MAILING_LIST_MULTI,RDNS_NONE,REPLYTO_WITHOUT_TO_CC, SPOOFED_FREEMAIL_NO_RDNS,URI_TRY_3LD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,229a77b902096176 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-10 13:52:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!newsfeed.stueberl.de!teaser.fr!enst.fr!not-for-mail From: "Gautier direct_replies_not_read" Newsgroups: comp.lang.ada Subject: Re: fastest data structure Date: Tue, 10 Dec 2002 21:51:45 +0000 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: avanie.enst.fr 1039557123 8202 137.194.161.2 (10 Dec 2002 21:52:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 10 Dec 2002 21:52:03 +0000 (UTC) Return-Path: X-Originating-IP: [80.218.91.170] X-OriginalArrivalTime: 10 Dec 2002 21:51:45.0370 (UTC) FILETIME=[552323A0:01C2A096] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:31656 Date: 2002-12-10T21:51:45+00:00 Etienne Baudin: >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; ... >From a pifometric point of view, I would say the array - with a loop-unrolling option to the compiler. But it depends on the size of your record, the 3D graphics system, etc. . My guess is that the speed will be very near for the two variants. But, the better is to compare, say with a lot of small faces so you have a greater CPU time for the traversal of your structure and a smaller time for the processing, so you see a bit more the comparison. HTH ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, e-mail address on the Web site! _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail