From: "Etienne Baudin" <pfoxNO@SPAMfree.fr>
Subject: fastest data structure
Date: Tue, 10 Dec 2002 22:01:03 +0100
Date: 2002-12-10T21:01:03+00:00 [thread overview]
Message-ID: <at5kmf$3ia$1@news-reader12.wanadoo.fr> (raw)
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
next reply other threads:[~2002-12-10 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-10 21:01 Etienne Baudin [this message]
2002-12-10 22:12 ` fastest data structure 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
-- strict thread matches above, loose matches on Subject: below --
2002-12-10 21:51 Gautier direct_replies_not_read
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox