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
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[good remarks snipped]
have been discussed pretty much everywhere; but a lot of people still
don't know them or decide to not know.
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.
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.
Ada has
been left behind since very few or nobody is actually taking a look at
the code and optimising it...
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?)
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?
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.
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
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
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?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 403 |
Nodes: | 16 (2 / 14) |
Uptime: | 22:57:06 |
Calls: | 8,482 |
Calls today: | 4 |
Files: | 13,187 |
Messages: | 5,913,545 |