comp.lang.ada
 help / color / mirror / Atom feed
From: "Etienne Baudin" <pfoxNO@SPAMfree.fr>
Subject: Re: fastest data structure
Date: Wed, 11 Dec 2002 16:02:52 +0100
Date: 2002-12-11T15:02:48+00:00	[thread overview]
Message-ID: <at7k2o$9fb$1@news-reader10.wanadoo.fr> (raw)
In-Reply-To: ScyJ9.313000$QZ.46513@sccrnsc02

Thanks for answers and the test program. I just modified My_type with a
record like that

type My_Type is record
    un : Integer;
    deux : Integer;
    trois : Integer;
    quatre : Integer;
    cinq : Integer;
    six : Integer;
 end record;

and process:

   procedure Processing (Data : My_Type ) is
      value : Integer;
      pragma Volatile( Value );
   begin
      value := data.un;
      value := data.un;
      value := data.un;
      value := data.un;
   end Processing;

and I obtained some weird results :

-- when I let the six components in My_type
Time for array based loop is   0.00151
Time for linked list based loop is   0.00175

-- with only 3 components in the record
Time for array based loop is   0.00109
Time for linked list based loop is   0.00112

--with only 1 component :
Time for array based loop is   0.00050
Time for linked list based loop is   0.00047

The process is the same with the 3 test (always reading "un") , and the
running time seems depend on the record size....??

Etienne Baudin





  parent reply	other threads:[~2002-12-11 15:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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