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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,325a055bed62c230 X-Google-Attributes: gid103376,public From: reason67@my-deja.com Subject: Re: Apex vs GNAT on solaris Date: 1999/12/07 Message-ID: <82hj9g$7gh$1@nnrp1.deja.com> X-Deja-AN: 557285607 References: <82hiuj$74o$1@nnrp1.deja.com> X-Http-Proxy: NetCache@www-blv-proxy3.boeing.com: Version NetApp Release 3.4D6: Mon Aug 23 16:40:19 PDT 1999-Solaris, 1.0 x39.deja.com:80 (Squid/1.1.22) for client 12.13.226.13 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue Dec 07 00:10:27 1999 GMT X-MyDeja-Info: XMYDJUIDreason67 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.06 [en] (X11; I; SunOS 5.6 sun4u) Date: 1999-12-07T00:00:00+00:00 List-Id: > 1.0 15 iterations of 1000 delays of duration'small. > report worst time for the delay and the average time. -=-=-=-=-=-=-=-=- with Ada.Calendar; with Ada.Text_Io; with Common_Utilities; procedure Aaaa_1_0_Timing_Test is package Long_Float_Io is new Ada.Text_Io.Float_Io (Long_Float); type Time_Stamp_Type is array (0 .. 1_000) of Ada.Calendar.Time; Compiler : constant String := "Apex"; Instances : constant := 15; Iterations : constant := 1000; Biggest_Number : Integer; Smallest_Number : Integer; Biggest : Long_Float := -1.0; Smallest : Long_Float := 100.0; Average : Long_Float := 0.0; Length : Long_Float; Time_Stamp : Time_Stamp_Type; Instance_Length : Integer; begin Ada.Text_Io.Put_Line ("::: [Aaaa_1_0_Timing_Test]"); Ada.Text_Io.Put_Line (Compiler & " timing test running " & Common_Utilities.Strip_Spaces (Integer'Image (Instances)) & " instances of " & Common_Utilities.Strip_Spaces (Integer'Image (Iterations)) & " delays of duration'small"); Instance_Length := Common_Utilities.Strip_Spaces (Integer'Image (Instances))'Length; for Counter in 1 .. Instances loop Biggest := -1.0; Smallest := 100.0; Average := 0.0; Time_Stamp (0) := Ada.Calendar.Clock; for Index in 1 .. Iterations loop delay Duration'Small; Time_Stamp (Index) := Ada.Calendar.Clock; end loop; for Index in 1 .. Iterations loop Length := Long_Float (Ada.Calendar."-" (Time_Stamp (Index), Time_Stamp (Index - 1))) - Long_Float (Duration'Small); if Biggest < Length then Biggest := Length; Biggest_Number := Index; end if; if Smallest > Length then Smallest := Length; Smallest_Number := Index; end if; Average := Average + Length; end loop; Average := Average / Long_Float (Iterations); Ada.Text_Io.Put ("Instance " & Common_Utilities.String_Of (Number => Counter, Length => Instance_Length, Show_Leading_Zeros => False) & ": Maximum time => "); Long_Float_Io.Put (Item => Biggest, Fore => 1, Aft => 4, Exp => 0); Ada.Text_Io.Put (Ascii.Ht & Ascii.Ht & "Average time => "); Long_Float_Io.Put (Item => Average, Fore => 1, Aft => 4, Exp => 0); Ada.Text_Io.New_Line; end loop; Ada.Text_Io.Put_Line ("::: [Aaaa_1_0_Timing_Test has finished]"); end Aaaa_1_0_Timing_Test; -=-=-=-=-=-=-=-=-=-=-=- -- -- Note: Apex duration'Small is 0.0001 -- Apex timing test running 15 instances of 1000 delays of duration'small Instance 1: Maximum time => 0.0670 Average time => 0.0003 Instance 2: Maximum time => 0.0006 Average time => 0.0001 Instance 3: Maximum time => 0.0108 Average time => 0.0001 Instance 4: Maximum time => 0.0006 Average time => 0.0001 Instance 5: Maximum time => 0.0006 Average time => 0.0001 Instance 6: Maximum time => 0.0002 Average time => 0.0001 Instance 7: Maximum time => 0.0002 Average time => 0.0001 Instance 8: Maximum time => 0.0007 Average time => 0.0001 Instance 9: Maximum time => 0.0005 Average time => 0.0001 Instance 10: Maximum time => 0.0006 Average time => 0.0001 Instance 11: Maximum time => 0.0108 Average time => 0.0001 Instance 12: Maximum time => 0.0380 Average time => 0.0001 Instance 13: Maximum time => 0.0010 Average time => 0.0001 Instance 14: Maximum time => 0.0062 Average time => 0.0001 Instance 15: Maximum time => 0.0108 Average time => 0.0001 -- -- Note: GNAT duration'Small is 0.000000001 -- GNAT timing test running 15 instances of 1000 delays of duration'small Instance 1: Maximum time => 0.0494 Average time => 0.0101 Instance 2: Maximum time => 0.0270 Average time => 0.0100 Instance 3: Maximum time => 0.0268 Average time => 0.0100 Instance 4: Maximum time => 0.0251 Average time => 0.0100 Instance 5: Maximum time => 0.0271 Average time => 0.0100 Instance 6: Maximum time => 0.0420 Average time => 0.0100 Instance 7: Maximum time => 0.0249 Average time => 0.0100 Instance 8: Maximum time => 0.1332 Average time => 0.0109 Instance 9: Maximum time => 0.1102 Average time => 0.0108 Instance 10: Maximum time => 0.1700 Average time => 0.0106 Instance 11: Maximum time => 0.1914 Average time => 0.0105 Instance 12: Maximum time => 0.0420 Average time => 0.0103 Instance 13: Maximum time => 0.0483 Average time => 0.0103 Instance 14: Maximum time => 0.1302 Average time => 0.0104 Instance 15: Maximum time => 0.0281 Average time => 0.0101 Sent via Deja.com http://www.deja.com/ Before you buy.