Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If you're not part of the solution, you're part of the precipitate.


devel / comp.lang.ada / Comparing languages wrt energy, speed, and memory use

SubjectAuthor
* Comparing languages wrt energy, speed, and memory useJerry
+* Re: Comparing languages wrt energy, speed, and memory useFernando Oleo Blanco
|+- Re: Comparing languages wrt energy, speed, and memory useJ-P. Rosen
|`* Re: Comparing languages wrt energy, speed, and memory useG.B.
| `- Re: Comparing languages wrt energy, speed, and memory useFernando Oleo Blanco
+- Re: Comparing languages wrt energy, speed, and memory use25.BX943
`- Re: Comparing languages wrt energy, speed, and memory useJeffrey R.Carter

1
Comparing languages wrt energy, speed, and memory use

<0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6671&group=comp.lang.ada#6671

  copy link   Newsgroups: comp.lang.ada
X-Received: by 2002:adf:f689:0:b0:1e6:88bf:8ac8 with SMTP id v9-20020adff689000000b001e688bf8ac8mr13647445wrp.189.1645397970340;
Sun, 20 Feb 2022 14:59:30 -0800 (PST)
X-Received: by 2002:a5b:9cc:0:b0:61d:f7ba:7fc with SMTP id y12-20020a5b09cc000000b0061df7ba07fcmr15273143ybq.434.1645397969896;
Sun, 20 Feb 2022 14:59:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.128.87.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.ada
Date: Sun, 20 Feb 2022 14:59:29 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=184.98.45.119; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG
NNTP-Posting-Host: 184.98.45.119
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
Subject: Comparing languages wrt energy, speed, and memory use
From: list_em...@icloud.com (Jerry)
Injection-Date: Sun, 20 Feb 2022 22:59:30 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Jerry - Sun, 20 Feb 2022 22:59 UTC

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

It is linked from this Slashdot page which I'm sure is full of useless chatter.

https://developers.slashdot.org/story/22/02/20/0143226/is-it-more-energy-efficient-to-program-in-rust

Re: Comparing languages wrt energy, speed, and memory use

<20220222211015.1cdb2a27@linux.fritz.box>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6673&group=comp.lang.ada#6673

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!wIev9X/j4KklVM1Z5EMf5A.user.46.165.242.75.POSTED!not-for-mail
From: irvise...@irvise.xyz (Fernando Oleo Blanco)
Newsgroups: comp.lang.ada
Subject: Re: Comparing languages wrt energy, speed, and memory use
Date: Tue, 22 Feb 2022 21:10:15 +0100
Organization: Aioe.org NNTP Server
Message-ID: <20220222211015.1cdb2a27@linux.fritz.box>
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="9470"; posting-host="wIev9X/j4KklVM1Z5EMf5A.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-suse-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Fernando Oleo Blanco - Tue, 22 Feb 2022 20:10 UTC

Hello everybody,

I am going to leave a few comments regarding this paper that I believe
everybody should know. Most if not all of these points are known and
have been discussed pretty much everywhere; but a lot of people still
don't know them or decide to not know.

The programs are taken from the Programming Language Benchmark Game. It
is a really cool place that has been providing relevant performance
data for a lot of languages and comparisons between them.

Here are a few issues:

1. Quite a few languages are not using heavily optimised code. Ada is
one of them. Some of those programs are written as direct
translations from other languages from people that did not know the
target language.
2. Quite a few of those implementations have not been touched in years.
Some of the improvements that may have taken place in the
language/compiler/tools may not be taken advantage of. For example,
the Ada examples are compiled with -gnatNp. Can anybody say what
that flag does? x)
3. C/C++/Rust program are competing on getting the best results. Other
languages are lagging behind. For example, Fortran could do much
better. For a couple of years, the Fortran community has been
improving the code little by little and they have managed to improve
their results.
4. There are a few controversies. Some languages are not allowed to use
higher performance libraries while others are allowed their stl or
equivalent that do actually use the same tools as those libraries.
Thre are a few other examples.

As the very Game page says, do not take the benchmark seriously. But
the communities whose languages are on top, they do not care. Ada has
been left behind since very few or nobody is actually taking a look at
the code and optimising it...

We may want to improve some of these tests as a community :)

Here are some relevant links:
- Benchmark game:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/
- Source code:
https://salsa.debian.org/benchmarksgame-team/benchmarksgame

Regards,
Fer

Am Sun, 20 Feb 2022 14:59:29 -0800 (PST)
schrieb Jerry <list_email@icloud.com>:

> 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
>
> It is linked from this Slashdot page which I'm sure is full of
> useless chatter.
>
> https://developers.slashdot.org/story/22/02/20/0143226/is-it-more-energy-efficient-to-program-in-rust
>

Re: Comparing languages wrt energy, speed, and memory use

<sv3i8l$99r$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6674&group=comp.lang.ada#6674

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ros...@adalog.fr (J-P. Rosen)
Newsgroups: comp.lang.ada
Subject: Re: Comparing languages wrt energy, speed, and memory use
Date: Tue, 22 Feb 2022 21:49:25 +0100
Organization: Adalog
Lines: 19
Message-ID: <sv3i8l$99r$1@dont-email.me>
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
<20220222211015.1cdb2a27@linux.fritz.box>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 22 Feb 2022 20:49:25 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="de3ecbc30f540885a68e2c7a899ddd1e";
logging-data="9531"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196jvCi9+eFci9rhuLPFWa1"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Cancel-Lock: sha1:Xrk76F5C3A5ElXxHkr/LpEtNQ5Y=
In-Reply-To: <20220222211015.1cdb2a27@linux.fritz.box>
Content-Language: fr
 by: J-P. Rosen - Tue, 22 Feb 2022 20:49 UTC

Le 22/02/2022 à 21:10, Fernando Oleo Blanco a écrit :
> I am going to leave a few comments regarding this paper that I believe
> everybody should know. Most if not all of these points are known and
> have been discussed pretty much everywhere; but a lot of people still
> don't know them or decide to not know.
[good remarks snipped]

Let me add another one: this benchmark does not consider the energy
(electrical and human) needed to write and debug the program... That
could also make a difference for Ada!

Real ecological balance, taking everything into account, is tricky...

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52
https://www.adalog.fr

Re: Comparing languages wrt energy, speed, and memory use

<sv7cth$ob6$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6675&group=comp.lang.ada#6675

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: bauh...@notmyhomepage.invalid (G.B.)
Newsgroups: comp.lang.ada
Subject: Re: Comparing languages wrt energy, speed, and memory use
Date: Thu, 24 Feb 2022 08:42:40 +0100
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <sv7cth$ob6$1@dont-email.me>
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
<20220222211015.1cdb2a27@linux.fritz.box>
Reply-To: nonlegitur@notmyhomepage.de
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 24 Feb 2022 07:42:41 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="f6c1ff3b512656dba5787bc53217e2cf";
logging-data="24934"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Q8qLLzUWgM15vUZCNnL2wJNA0ell2V3s="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock: sha1:+S4VGZCBf1LkctEj96KnbwlR8dg=
In-Reply-To: <20220222211015.1cdb2a27@linux.fritz.box>
Content-Language: en-US
 by: G.B. - Thu, 24 Feb 2022 07:42 UTC

On 22.02.22 21:10, Fernando Oleo Blanco wrote:
> Hello everybody,
>
> I am going to leave a few comments regarding this paper that I believe
> everybody should know. Most if not all of these points are known and
> have been discussed pretty much everywhere; but a lot of people still
> don't know them or decide to not know.
>
> The programs are taken from the Programming Language Benchmark Game. It
> is a really cool place that has been providing relevant performance
> data for a lot of languages and comparisons between them.
>
> Here are a few issues:

One issue is Isaac Gouy's clever approach. (Not complaining. I sometimes
didn't see the point, though, of adopting another new thing. For example,
when a new regex library was introduced (at some point) that wins hands
down by using optimization techniques you'd associate with JIT compilers
or with data based optimization. Worth knowing about, but how does it
help comparing languages when all you can do is link it to your program?)

> 1. Quite a few languages are not using heavily optimised code. Ada is
> one of them. Some of those programs are written as direct
> translations from other languages from people that did not know the
> target language.

Can you be specific? For example, at least one program currently
leads by making extensive use of x86 intrinsic ops.

Some use OMP with intrinsic 128bit ops. Does GNAT have a similar parallel
loop in the language yet?


> 2. Quite a few of those implementations have not been touched in years.

Yet, some Ada program versions #N+m used to run faster than #N. They now
have their speed difference wiped out or even reversed...
I see -march=ivybridge now, so the hardware has likely changed.

> Some of the improvements that may have taken place in the
> language/compiler/tools may not be taken advantage of. For example,
> the Ada examples are compiled with -gnatNp. Can anybody say what
> that flag does? x)

GNAT User's Guide explains. (su-p-press and front end i-N-lining)

> 3. C/C++/Rust program are competing on getting the best results. Other
> languages are lagging behind. For example, Fortran could do much
> better.

How would Fortran do much better? Can Ada learn from that?

> 4. There are a few controversies. Some languages are not allowed to use
> higher performance libraries while others are allowed their stl or
> equivalent that do actually use the same tools as those libraries.
> Thre are a few other examples.

Controversies add to the management's keeping this a lively benchmark.

> Ada has
> been left behind since very few or nobody is actually taking a look at
> the code and optimising it...

Care to be specific how it is not optimized? There is always room for
better algorithms. Looking at fasta, the leading programs all use threading
now, with the exception of the one at the top, which has an introductory
comment.

Re: Comparing languages wrt energy, speed, and memory use

<20220224101346.1a70a96a@linux.fritz.box>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6676&group=comp.lang.ada#6676

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!BeRm+3HNoHPwf8prYVNpnQ.user.46.165.242.75.POSTED!not-for-mail
From: irvise...@irvise.xyz (Fernando Oleo Blanco)
Newsgroups: comp.lang.ada
Subject: Re: Comparing languages wrt energy, speed, and memory use
Date: Thu, 24 Feb 2022 10:13:46 +0100
Organization: Aioe.org NNTP Server
Message-ID: <20220224101346.1a70a96a@linux.fritz.box>
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
<20220222211015.1cdb2a27@linux.fritz.box>
<sv7cth$ob6$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: gioia.aioe.org; logging-data="55496"; posting-host="BeRm+3HNoHPwf8prYVNpnQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-suse-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Fernando Oleo Blanco - Thu, 24 Feb 2022 09:13 UTC

Hi,

answer is interlaced with your text.

Am Thu, 24 Feb 2022 08:42:40 +0100
schrieb "G.B." <bauhaus@notmyhomepage.invalid>:

> One issue is Isaac Gouy's clever approach. (Not complaining. I
> sometimes didn't see the point, though, of adopting another new
> thing. For example, when a new regex library was introduced (at some
> point) that wins hands down by using optimization techniques you'd
> associate with JIT compilers or with data based optimization. Worth
> knowing about, but how does it help comparing languages when all you
> can do is link it to your program?)
>

True, that is the case of GMP for some multiprecission test... Some
languages use it, other implement the algorithms themselves...

>
> Can you be specific? For example, at least one program currently
> leads by making extensive use of x86 intrinsic ops.
>
> Some use OMP with intrinsic 128bit ops. Does GNAT have a similar
> parallel loop in the language yet?
>

Yes, take a look at
https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-gnat-2.html
it is taken from the Pascal implementation and uses intrinsics. My
point is that some of these programs are not very Ada-like. As far as I
remember, there was one ported from Lua.

Ada 2022 will have a parallel keyword. However, it is still not
supported in FSF GNAT, which is the one being used. Also, the
benchmarks are Ada 2012.

>
> Yet, some Ada program versions #N+m used to run faster than #N. They
> now have their speed difference wiped out or even reversed...
> I see -march=ivybridge now, so the hardware has likely changed.
>
> > Some of the improvements that may have taken place in the
> > language/compiler/tools may not be taken advantage of. For
> > example, the Ada examples are compiled with -gnatNp. Can anybody
> > say what that flag does? x)
>
> GNAT User's Guide explains. (su-p-press and front end i-N-lining)
>

Correct, but that switch has been deprecated for years, it is no longer
documented anywhere in the new GNAT releases:
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gnat_ugn.pdf

> > 3. C/C++/Rust program are competing on getting the best results.
> > Other languages are lagging behind. For example, Fortran could do
> > much better.
>
> How would Fortran do much better? Can Ada learn from that?
>

Fortran is using Intel's compiler, which is known to be one of the best.
Fortran compilers can much more easily generate SIMD code and
parallelise loops automatically if the code is idiomatic.

Also, Fortran was not fourth in the race a while ago. For example Ada
overtook Fortran for a small while. December 2018:
https://web.archive.org/web/20181204085050/https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fast.html
Ada is fourth; while it was fifth in April of that same year
https://web.archive.org/web/20180406194535/https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html
A year later, December 2019, Fortran could be fourth it it were not for
that outlier
https://web.archive.org/web/20191225172425/https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html

These are the current results:
https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html
Take a look at the evolution of the language podium. It has always been
C/C++/Rust, but starting from the fourth position there has been quite
a bit or rivalry.

> > 4. There are a few controversies. Some languages are not allowed to
> > use higher performance libraries while others are allowed their stl
> > or equivalent that do actually use the same tools as those
> > libraries. Thre are a few other examples.
>
> Controversies add to the management's keeping this a lively benchmark.
>
> > Ada has
> > been left behind since very few or nobody is actually taking a look
> > at the code and optimising it...
>
> Care to be specific how it is not optimized? There is always room for
> better algorithms. Looking at fasta, the leading programs all use
> threading now, with the exception of the one at the top, which has an
> introductory comment.
>

Some Ada programs could use better algorithms, data structures, more
up-to-date syntax and parallelism. Some programs could also be made a
bit prettier.

The crux of the issue is that you can pretty much always get peak
performance for non-GC languages if you use the same techniques,
libraries, algos, state of the art compilers, etc. And in a lot of real
world cases, even GC languages are not an issue, see Go, Erlang, Julia,
Lisp (SBCL), Nim...

But as someone (I believe it was the dean of TUM (Technische Universität
München)) once said: "Everybody knows that rankings are flawed, but it
is always better to be on top." The benchmark game, is after all, a
game. But some people took it to seriously. It is just like Football
hooligans.

Regards,
Fer

Re: Comparing languages wrt energy, speed, and memory use

<ne2dndXfLc0UbYf_nZ2dnUU7-dfNnZ2d@earthlink.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6680&group=comp.lang.ada#6680

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!2.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Sat, 26 Feb 2022 21:31:21 -0600
Subject: Re: Comparing languages wrt energy, speed, and memory use
Newsgroups: comp.lang.ada
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
From: 25BZ...@nada.net (25.BX943)
Date: Sat, 26 Feb 2022 22:31:19 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Message-ID: <ne2dndXfLc0UbYf_nZ2dnUU7-dfNnZ2d@earthlink.com>
Lines: 30
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.77.165.67
X-Trace: sv3-72V33ZjabH1ITs949kNXmc6gKHVv7v3fCq2PYFkX4UpVxvlQiM0iH7alOWvSyN1aGx1Fh9rKx8fEyl0!sDhVk3I05Pi8GAYM6jCJZ2BRtoH3sbdxmDrq7avuxtxlIRXEq2a1hyBx3VV6AK2aEMmUiG1BnDBi!XmVXfBb9qxG4vR/Bfxc=
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2615
 by: 25.BX943 - Sun, 27 Feb 2022 03:31 UTC

On 2/20/22 5:59 PM, 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
>
> It is linked from this Slashdot page which I'm sure is full of useless chatter.
>
> https://developers.slashdot.org/story/22/02/20/0143226/is-it-more-energy-efficient-to-program-in-rust

After 30+ years, I started messing around with FORTRAN again.
One of the things I noticed in the various help notes online
was that programmers were actually comparing the numbers of
cycles and executables size for various ways of solving any
particular problem.

This sort of thinking is rarely seen these days except in the
microcontroller universe - and less even there because the
RAM/ROM and speed of those devices has increased.

ADA is another language where overall "efficiency" gets at
least some consideration.

With energy costs rising, maybe it's time to see MORE of these
discussions and comparisons. Global warming be damned - this is
a MONEY issue ! :-)

Oh, and rising power costs may disappear the crypto sector.
Those boxes full of GPUs calculating like mad - the power
usage is stupendous. Once the energy in begins to exceed the
value of the Bitcoins out - it's all over.

Re: Comparing languages wrt energy, speed, and memory use

<svfebe$enc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6683&group=comp.lang.ada#6683

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spam.jrc...@spam.acm.org.not (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
Lines: 31
Message-ID: <svfebe$enc$1@dont-email.me>
References: <0d1a120a-d446-4a15-a1b2-d1b1c5d8b465n@googlegroups.com>
<fc550237-5371-4673-907a-99fcde738cc2n@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: <fc550237-5371-4673-907a-99fcde738cc2n@googlegroups.com>
Content-Language: en-US
 by: Jeffrey R.Carter - Sun, 27 Feb 2022 08:56 UTC

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

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor