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: <82hjta$7tt$1@nnrp1.deja.com> X-Deja-AN: 557289958 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 x28.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:21:02 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.3 15 iterations of 100 delays of 0.0 in 100 tasks. -=-=-=-=-=-=-=-=- with Ada.Calendar; with Ada.Text_Io; with Common_Utilities; procedure Aaaa_1_3_Timing_Test is package Long_Float_Io is new Ada.Text_Io.Float_Io (Long_Float); Compiler : constant String := "Apex"; Instances : constant := 15; Iterations : constant := 100; Task_Number : constant := 100; type Time_Stamp_Type is array (0 .. Iterations) of Ada.Calendar.Time; task type Time_Context_Switches is entry Start; end Time_Context_Switches; for Time_Context_Switches'Storage_Size use 100000; type Timer_Array_Type is array (1 .. Task_Number) of Time_Context_Switches; Timer : Timer_Array_Type; task Controller is entry Finish (Biggest : in Long_Float; Average : in Long_Float); end Controller; task body Time_Context_Switches is Biggest : Long_Float := -1.0; Average : Long_Float := 0.0; Length : Long_Float; Time_Stamp : Time_Stamp_Type; begin Forever: loop Biggest := -1.0; Average := 0.0; select accept Start; or terminate; end select; Time_Stamp (0) := Ada.Calendar.Clock; for Index in 1 .. Iterations loop delay 0.0; 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))); if Biggest < Length then Biggest := Length; end if; Average := Average + Length; end loop; Average := Average / Long_Float (Iterations); Controller.Finish (Biggest => Biggest, Average => Average); end loop Forever; end Time_Context_Switches; task body Controller is Local_Biggest : Long_Float := -1.0; Local_Average : Long_Float := 0.0; Instance_Length : Integer; begin Ada.Text_Io.Put_Line ("::: [Aaaa_1_3_Timing_Test]"); Ada.Text_Io.Put_Line (Compiler & " tasking timing test running " & Common_Utilities.Strip_Spaces (Integer'Image (Instances)) & " instances of " & Common_Utilities.Strip_Spaces (Integer'Image (Iterations)) & " delays of 0, in " & Common_Utilities.Strip_Spaces (Integer'Image (Task_Number)) & " tasks"); Instance_Length := Common_Utilities.Strip_Spaces (Integer'Image (Instances))'Length; for Counter in 1 .. Instances loop for Index in 1 .. Task_Number loop Timer (Index).Start; end loop; Local_Biggest := -1.0; Local_Average := 0.0; for Index in 1 .. Task_Number loop accept Finish (Biggest : in Long_Float; Average : in Long_Float) do if Biggest > Local_Biggest then Local_Biggest := Biggest; end if; Local_Average := Average + Local_Average; end Finish; end loop; Local_Average := Local_Average / Long_Float (Task_Number); 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 => Local_Biggest, Fore => 1, Aft => 4, Exp => 0); Ada.Text_Io.Put (Ascii.Ht & Ascii.Ht & "Average time => "); Long_Float_Io.Put (Item => Local_Average, Fore => 1, Aft => 4, Exp => 0); Ada.Text_Io.New_Line; end loop; Ada.Text_Io.Put_Line ("::: [Aaaa_1_3_Timing_Test has finished]"); end Controller; begin null; end Aaaa_1_3_Timing_Test; -=-=-=-=-=-=-=-=-= Apex tasking timing test running 15 instances of 100 delays of 0, in 100 tasks Instance 1: Maximum time => 0.1668 Average time => 0.0000 Instance 2: Maximum time => 0.0076 Average time => 0.0000 Instance 3: Maximum time => 0.0023 Average time => 0.0000 Instance 4: Maximum time => 0.0103 Average time => 0.0000 Instance 5: Maximum time => 0.0026 Average time => 0.0000 Instance 6: Maximum time => 0.0027 Average time => 0.0000 Instance 7: Maximum time => 0.0022 Average time => 0.0000 Instance 8: Maximum time => 0.0139 Average time => 0.0000 Instance 9: Maximum time => 0.0006 Average time => 0.0000 Instance 10: Maximum time => 0.0103 Average time => 0.0000 Instance 11: Maximum time => 0.0089 Average time => 0.0000 Instance 12: Maximum time => 0.0026 Average time => 0.0000 Instance 13: Maximum time => 0.0110 Average time => 0.0000 Instance 14: Maximum time => 0.0050 Average time => 0.0000 Instance 15: Maximum time => 0.0117 Average time => 0.0000 GNAT tasking timing test running 15 instances of 100 delays of 0, in 100 tasks Instance 1: Maximum time => 0.0152 Average time => 0.0011 Instance 2: Maximum time => 0.0130 Average time => 0.0012 Instance 3: Maximum time => 0.0143 Average time => 0.0013 Instance 4: Maximum time => 0.0142 Average time => 0.0013 Instance 5: Maximum time => 0.0139 Average time => 0.0013 Instance 6: Maximum time => 0.0681 Average time => 0.0012 Instance 7: Maximum time => 0.1722 Average time => 0.0001 Instance 8: Maximum time => 0.0036 Average time => 0.0001 Instance 9: Maximum time => 0.1307 Average time => 0.0001 Instance 10: Maximum time => 0.1089 Average time => 0.0001 Instance 11: Maximum time => 0.0988 Average time => 0.0001 Instance 12: Maximum time => 0.0907 Average time => 0.0001 Instance 13: Maximum time => 0.0141 Average time => 0.0001 Instance 14: Maximum time => 0.0333 Average time => 0.0001 Instance 15: Maximum time => 0.0318 Average time => 0.0001 Sent via Deja.com http://www.deja.com/ Before you buy.