comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Simplest Ada program
Date: Sat, 26 Nov 2016 00:53:46 +0200
Date: 2016-11-26T00:53:46+02:00	[thread overview]
Message-ID: <e9rtnqFkiotU1@mid.individual.net> (raw)
In-Reply-To: <o18unm$e27$7@dont-email.me>

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
       .      @       .

  parent reply	other threads:[~2016-11-25 22:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-21  8:22 Simplest Ada program Mr. Man-wai Chang
2016-11-21  8:25 ` Dmitry A. Kazakov
2016-11-21  8:27   ` Mr. Man-wai Chang
2016-11-21  8:41     ` Dmitry A. Kazakov
2016-11-21  8:57       ` Mr. Man-wai Chang
2016-11-21  9:17         ` Dmitry A. Kazakov
2016-11-21 11:38           ` Mr. Man-wai Chang
2016-11-21 14:41             ` Dmitry A. Kazakov
2016-11-21 14:57               ` G.B.
2016-11-21 14:58               ` Mr. Man-wai Chang
2016-11-21 22:20                 ` Niklas Holsti
2016-11-24 19:26                   ` Jacob Sparre Andersen
2016-11-25  9:04                   ` Mr. Man-wai Chang
2016-11-25  9:19                     ` Dmitry A. Kazakov
2016-11-25  9:24                       ` Mr. Man-wai Chang
2016-11-25 16:23                         ` Chris Moore
2016-11-25 16:29                           ` Mr. Man-wai Chang
2016-11-25 22:53                     ` Niklas Holsti [this message]
2016-11-26 11:58                       ` Mr. Man-wai Chang
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox