comp.lang.ada
 help / color / mirror / Atom feed
From: "Gautier direct_replies_not_read" <gautier_niouzes@hotmail.com>
Subject: Re: fastest data structure
Date: Tue, 10 Dec 2002 21:51:45 +0000
Date: 2002-12-10T21:51:45+00:00	[thread overview]
Message-ID: <mailman.1039557122.14948.comp.lang.ada@ada.eu.org> (raw)

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




             reply	other threads:[~2002-12-10 21:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-10 21:51 Gautier direct_replies_not_read [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-10 21:01 fastest data structure Etienne Baudin
2002-12-10 22:12 ` Victor Porton
2002-12-11  1:14 ` Jeffrey Carter
2002-12-11  3:23 ` SteveD
2002-12-11 13:03   ` Marin David Condic
2002-12-11 15:02   ` Etienne Baudin
2002-12-11 15:11     ` Lutz Donnerhacke
2002-12-11 19:04     ` tmoran
2002-12-12  4:22     ` SteveD
2002-12-12 12:40       ` P R Keeble
2002-12-14 16:23       ` Simon Wright
2002-12-17  0:33         ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox