comp.lang.ada
 help / color / mirror / Atom feed
From: Bill Findlay <yaldnif.w@blueyonder.co.uk>
Subject: Re: Have the Itanium critics all been proven wrong?
Date: Wed, 22 Aug 2012 23:35:18 +0100
Date: 2012-08-22T23:35:18+01:00	[thread overview]
Message-ID: <CC5B1D36.1BEF4%yaldnif.w@blueyonder.co.uk> (raw)
In-Reply-To: CC545B6F.1BA11%yaldnif.w@blueyonder.co.uk

Following up my own post ...

On 17/08/2012 20:34, in article CC545B6F.1BA11%yaldnif.w@blueyonder.co.uk,
"Bill Findlay" <yaldnif.w@blueyonder.co.uk> wrote:

> On 17/08/2012 20:17, in article k0m5c3$t6t$1@dont-email.me, "Stephen Fuld"
> <SFuld@alumni.cmu.edu.invalid> wrote:
> 
>> On 8/17/2012 2:05 AM, Nomen Nescio wrote:
>>> The point of Ada is safety and runtime checks. That is provided through
>>> intensive compilation and an engineered runtime system. In a bare metal Ada,
>>> there is a limit to what safety it can provide and the runtime checks will
>>> introduce overhead over C. Otherwise Bill is arguing that there is a free
>>> lunch, and we see that can't very well be.
>> 
>> I don't think he is arguing for a free lunch, just a relatively low cost
>> one. Note that, as has been repeatedly pointed out, things like C's poor
>> aliasing limits prevent some optimizations that other languages allow.
>> So while there is a cost to the additional run time checks (the
>> compilation stuff doesn't cost at run time), there are some advantages
>> to using other languages too.  And if the cost is relatively small, it
>> may be worth the cost for the gain in security, reliability, etc.
> 
> Runtime security is not the same thing as runtime checks.

The magnitude of the checking "overhead" has been called into question.
Should it be prohibitive in special cases, a selection of particular checks
can be suppressed over well-defined scopes.  However, the real cost is often
surprisingly small.

Here is some actual data, rather than speculation.
 
My KDF9 emulator is about 20KSLOC.  Compiled with all runtime checking
disabled, it runs 1.25% faster than when compiled with default checking.
  
Interestingly, if I do not suppress absolutely all checks, but enable them
for "non-inner loop" modules, it runs a further 1.25% faster than when
completely unchecked.  More checks -> faster code!

Another program of mine, an assembler of about 10KSLOC, runs 1% faster with
default checking than it does with checking completely suppressed.

Such are the vagaries of performance measurement with modern CPUs.

So for some programs, at least, the overhead due to runtime checking is down
near the noise level.

-- 
Bill Findlay
with blueyonder.co.uk;
use  surname & forename;





       reply	other threads:[~2012-08-26 14:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <k0jkb3$hm1$1@dont-email.me>
     [not found] ` <632eec054470aafb59e98744e950ea8b@dizum.com>
     [not found]   ` <k0m5c3$t6t$1@dont-email.me>
     [not found]     ` <CC545B6F.1BA11%yaldnif.w@blueyonder.co.uk>
2012-08-22 22:35       ` Bill Findlay [this message]
     [not found] <5021874F.1747D0BF@sonic.net>
     [not found] ` <1e1tf9-0kp2.ln1@ntp6.tmsw.no>
     [not found]   ` <k0gn5r$l9h$1@needham.csi.cam.ac.uk>
     [not found]     ` <GPRWr.31944$Bw1.31300@newsfe05.iad>
     [not found]       ` <k0gq97$li8$1@needham.csi.cam.ac.uk>
     [not found]         ` <k0h6ef$jke$1@speranza.aioe.org>
     [not found]           ` <46f19bfc-930e-4f06-b5a6-c60f39cfda0c@p14g2000yqk.googlegroups.com>
     [not found]             ` <k0r609$4ij$1@speranza.aioe.org>
     [not found]               ` <077b12f6-1196-4b5c-bbdb-04291b1ae616@q22g2000vbx.googlegroups.com>
     [not found]                 ` <k0rree$lkn$1@speranza.aioe.org>
     [not found]                   ` <CC5730C5.1BC2E%yaldnif.w@blueyonder.co.uk>
     [not found]                     ` <k0t67b$b8r$1@speranza.aioe.org>
     [not found]                       ` <CC585119.1BCCC%yaldnif.w@blueyonder.co.uk>
     [not found]                         ` <k0uenp$fbg$1@speranza.aioe.org>
     [not found]                           ` <k0vo9u$fer$1@dont-email.me>
     [not found]                             ` <589825d2-d998-456a-9c37-c8ae13e1e7bc@e29g2000vbm.googlegroups.com>
2012-08-21 20:48                               ` Have the Itanium critics all been proven wrong? Niklas Holsti
2012-08-21 22:32                                 ` Robert A Duff
     [not found]                                 ` <keb838pn40uf3pq1536e9b3dptgd57h3se@invalid.netcom.com>
2012-08-22  2:32                                   ` Bill Findlay
2012-08-22  2:42                                     ` Adam Beneschan
2012-08-22  4:08                                       ` Bill Findlay
2012-08-22  4:40                                         ` Adam Beneschan
2012-08-22  9:29                                 ` Michael S
2012-08-22 10:14                                   ` Dmitry A. Kazakov
2012-08-22 10:28                                   ` Ludovic Brenta
2012-08-22 12:48                                     ` Brian Drummond
2012-08-22 15:42                                       ` Ludovic Brenta
2012-08-22 10:54                                   ` Niklas Holsti
2012-08-22 12:43                                     ` Michael S
2012-08-22 13:20                                       ` Michael S
2012-08-22 22:30                                         ` Randy Brukardt
     [not found]                               ` <k10tdr$nm6$1@dont-email.me>
     [not found]                                 ` <bb4e5231-142b-437c-8c2a-bbd6daf34df8@g2g2000vba.googlegroups.com>
2012-08-22 12:39                                   ` Brian Drummond
2012-08-22 14:00                                     ` Michael S
2012-08-22 15:06                                       ` Brian Drummond
2012-08-22 15:21                                         ` Bill Findlay
2012-08-22 15:59                                         ` Michael S
2012-08-22 16:01                                           ` Michael S
2012-08-22 16:58                                           ` Georg Bauhaus
2012-08-22 18:18                                           ` Bill Findlay
2012-08-22 15:05                                     ` Simon Wright
replies disabled

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