comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: A couple of quick questions
Date: Sat, 29 Dec 2012 08:15:01 -0800 (PST)
Date: 2012-12-29T08:15:01-08:00	[thread overview]
Message-ID: <ea507393-d4ff-4451-b1e8-4d055da9b794@googlegroups.com> (raw)
In-Reply-To: <87zk0xkucv.fsf@mid.deneb.enyo.de>

On Saturday, December 29, 2012 4:47:44 AM UTC-6, Florian Weimer wrote:
> * Dufr:
> 
> > Is the efficiency of the compiled code by penalized in any way by
> > the putative bloat of the language?
> 
> [...] Run-time checks (such as overflow checks and array bounds
> checks) are typically bloat which increases instruction cache pressure
> and decreases effective execution speed.

But you're doing Ada a bit of a disservice here: Ada compilers are typically smart enough to omit range-checks where the value can be guaranteed as valid, such as "FOR Index IN Array'Range Loop [...]", no check is needed because the type  of Index guarantees that it is valid.

> Code for abort deferral is
> automatically inserted by the compiler and slows down the program,
> even if no asynchronous transfer of control ever occurs.

Isn't this only an issue ONLY when the TASK (or possibly PROTECTED object) construct is used?
It seems rather contrary to optimization (which Ada compilers, in theory, can do more  effectively than, say, C++ or PHP) techniques.



  reply	other threads:[~2012-12-29 16:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 15:02 A couple of quick questions Dufr
2012-12-28 15:43 ` Thomas Løcke
2012-12-28 16:46 ` Georg Bauhaus
2012-12-28 20:28 ` Dufr
2012-12-28 23:27   ` Georg Bauhaus
2012-12-28 23:36     ` Georg Bauhaus
2012-12-29  0:41   ` Yannick Duchêne (Hibou57)
2012-12-29 10:47   ` Florian Weimer
2012-12-29 16:15     ` Shark8 [this message]
2012-12-29 16:32       ` Bill Findlay
2012-12-29 17:21       ` Florian Weimer
2012-12-31  8:56 ` Paul Colin Gloster
replies disabled

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