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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Intervention needed? Date: Fri, 22 Mar 2019 17:41:01 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5fb80936-f660-47dd-9cf5-73d35406782f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 22 Mar 2019 16:41:03 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="e95a6ae54d85fbd5d446d1e357e3eb2f"; logging-data="1704"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UZJCZzB9chkNaK4UmyDvpoiYF0wyTPfk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 Cancel-Lock: sha1:g1ariUZ4aHsMLyzXbXwcBr9oL4g= In-Reply-To: <5fb80936-f660-47dd-9cf5-73d35406782f@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:55931 Date: 2019-03-22T17:41:01+01:00 List-Id: On 3/22/19 12:10 PM, Lucretia wrote: > See in: https://users.rust-lang.org/t/if-ada-is-already-very-safe-why-rust/21911/47 > >> He also told me that Ada compilers aren’t allowed to do certain kinds of optimizations that for example c, c++ (and Rust and other PL via LLVM) are doing. > > How true is this? In the late 1980s-early 1990s there was a company named Tartan that sold C compilers for TI chips. TI chips came with a free C compiler, but people were willing to pay for the Tartan compilers because of their excellent optimization. Tartan also sold Ada compilers with excellent optimization (see the "Ada Outperforms Assembly" paper). There were some papers published (probably in /Ada Letters/) in which the compiler writers demonstrated that their Ada compilers were faster than their C compilers, and discussed reasons why. One reason I recall was that in Ada, the compiler knew what was aliased and what wasn't, while in C everything is implicitly aliased, and this allowed optimizations of Ada that could not be done for C. So for Ada 83 circa 1990, this statement is clearly false. With another 30 years of optimization technology behind us, I don't know for sure, but I suspect that hasn't changed. -- Jeff Carter "Crucifixion's a doddle." Monty Python's Life of Brian 82