From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Comparing languages wrt energy, speed, and memory use Date: Sun, 27 Feb 2022 09:56:12 +0100 Organization: A noiseless patient Spider Message-ID: References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 27 Feb 2022 08:56:14 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="4804a39a410c459f3555da183876a799"; logging-data="15084"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/CtppHbKwIxT7Lj4OeJ9EUQg2dYSzIKk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cancel-Lock: sha1:PnWGm1D47eUClfp+iU2br8llpfU= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63574 List-Id: On 2022-02-27 09:05, Robin Vowels wrote: > On Monday, February 21, 2022 at 9:59:32 AM UTC+11, Jerry wrote: >> This paper comparing 27 languages with respect to energy use, speed, and memory use is interesting. Of course Ada fares very well. >> >> https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf > . > Has this anything to do with reality? > . > What of the design, testing, and maintainability of programs? There are a couple of obvious problems with this study. First, the same data structures, algorithms, and checks for validity of input and so on, in any imperative language, should give very similar machine code. Robert Dewar famously had a collection of equivalent Ada and C programs that produced identical machine code when compiled with gcc. The kind of differences reported between C and Ada or C++ shows that they are comparing apples to orangutans. Second, there are hard data that show that, compared to low-level languages like C, Ada requires 1/2 the effort to reach deployment, and 1/40 the effort to correct post-deployment errors. The energy consumption for that additional effort should swamp the kind of small differences during execution that this study concentrates on. -- Jeff Carter “A key difference between Ada and most other software development languages is that Ada is deigned as an engineering tool as well as a programming tool.” Ada Distilled 209