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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Simplest Ada program Date: Sat, 26 Nov 2016 00:53:46 +0200 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net zV2LOcUtRcg2cXKWWHK++AnDIwZKQuEm+04ci7BsKcyIq7k1Q9 Cancel-Lock: sha1:Z4kNGth056sqfmP3PZ9kCtGEZIU= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:32468 Date: 2016-11-26T00:53:46+02:00 List-Id: On 16-11-25 11:04 , Mr. Man-wai Chang wrote: > On 22/11/2016 6:20 AM, Niklas Holsti wrote: >>> Could you compile your simplest Ada programs in other platforms and run >>> loaders to time each executable? >> >> Of course one could do that, but why? The "simplest Ada program" is not >> useful for anything, so why is its start-up time of interest? Any real >> program will have a different (probably larger) start-up time, plus the >> time it takes to actually do something. > > It should give you the minimum amount of time to run an Ada program in a > one-user operating system? And why do you want to know that? This program does nothing. But ok, ok, so I did this: - Compiled the following program: procedure Nothing is begin null; end Nothing; - Timed this command as 3.176 sec: seq 1000 | while read x; do x=""; ./nothing; done - Subtracted the time of the corresponding command with the ./nothing removed, which was 0.031 s - Divided by 1000 to get an average time of 3.145 ms per execution of ./nothing. This was on a MacBook Air, 2.13 GHz Intel Core 2 Duo, 4 GB 1067 MHz DDR RAM, SSD. >> What do you _really_ want to know? > > How do you benchmark real-time Ada programs? ;) "Benchmark"? Real-time Ada programs in my area run in embedded machines, bare-board or with an Ada RTS. They start up from EEPROM and then run "forever". We analyse the code statically for worst-case time, or measure on the target board. Start-up time on a personal computer OS is irrelevant. "Benchmarks" in the sense of standard programs that one compiles and executes in order to gauge the relative speeds of different target systems or the efficiency of the code generated by different compilers are not very relevant in this area, IMO. The hot spots of processor loading are often application-specific and then do not match typical benchmarks. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .