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!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Fri, 11 May 2018 10:39:23 -0700 Organization: A noiseless patient Spider Message-ID: <87mux62it0.fsf@nightsong.com> References: <1c73f159-eae4-4ae7-a348-03964b007197@googlegroups.com> <16406268-83df-4564-8855-9bd0fe9caac0@googlegroups.com> <87o9i2pkcr.fsf@nightsong.com> <87in88m43h.fsf@nightsong.com> <87efiuope8.fsf@nightsong.com> <87lgd1heva.fsf@nightsong.com> <87zi1gz3kl.fsf@nightsong.com> <878t8x7k1j.fsf@nightsong.com> <87fu342q1o.fsf@nightsong.com> <87mux9645j.fsf@nightsong.com> <8736yz18e4.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="4776ca6b408eab45c2cc0c9a5f8c8c74"; logging-data="11368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SidfSy52GoYnBen13/pE9" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:sPvEmPBFRfO5/S4uXH2NT0nYiS0= sha1:wcP6vBLXsmP2VKhOGPFPN9htTt8= Xref: reader02.eternal-september.org comp.lang.ada:52279 Date: 2018-05-11T10:39:23-07:00 List-Id: "Jeffrey R. Carter" writes: > Correct C is usually slower than correct Ada that does the same thing, > because an Ada compiler can optimize away many checks that will be > left in the C because it's too much effort to manually prove that they > will never fail. Going by the Alioth shootout and by the Unzip-Ada program discussed here recently, Ada = 1.3x slower sounds about right to me. I'd consider that to be part of the price (and worth paying) for Ada to leave checks *in* that the C compiler would unsafely omit. I don't think the Ada compiler can prove that much safety by itself (maybe a little bit involving aliases) that a C compiler can't. SPARK is a different story, but that ramps up the development effort to a new level.