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=0.1 required=3.0 tests=BAYES_05,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "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 Message-ID: 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 Xref: reader02.eternal-september.org comp.lang.ada:63565 List-Id: 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.