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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d2fe8ae54035f25f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.190.193 with SMTP id dj1mr19236455qab.6.1356797701429; Sat, 29 Dec 2012 08:15:01 -0800 (PST) Received: by 10.49.116.34 with SMTP id jt2mr5611109qeb.38.1356797701411; Sat, 29 Dec 2012 08:15:01 -0800 (PST) Path: k2ni3151qap.0!nntp.google.com!ee4no4164087qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 29 Dec 2012 08:15:01 -0800 (PST) In-Reply-To: <87zk0xkucv.fsf@mid.deneb.enyo.de> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.153.58.182; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.153.58.182 References: <195201b7-c447-4580-aeb4-1c2329ee45e0@googlegroups.com> <0387724a-7fd2-4317-ba16-d3322dd0fdec@googlegroups.com> <87zk0xkucv.fsf@mid.deneb.enyo.de> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: A couple of quick questions From: Shark8 Injection-Date: Sat, 29 Dec 2012 16:15:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-12-29T08:15:01-08:00 List-Id: On Saturday, December 29, 2012 4:47:44 AM UTC-6, Florian Weimer wrote: > * Dufr: >=20 > > Is the efficiency of the compiled code by penalized in any way by > > the putative bloat of the language? >=20 > [...] 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 typicall= y smart enough to omit range-checks where the value can be guaranteed as va= lid, such as "FOR Index IN Array'Range Loop [...]", no check is needed beca= use 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, c= an do more effectively than, say, C++ or PHP) techniques.