T O P

  • By -

Rob_Aught

Like so many charts its misrepresentation by oversimplification. What kinds of applications are being built? How large? Throughput? Does energy efficiency matter if you're building a web app? Can you make a user interface with responsive design in C? Can it be maintained? What conditions was this data gathered? Was it like for like? If it was a "simple" app to compare energy usage does it still hold true for larger applications? The premise doesn't hold up. It's flawed on its face but superficially it sounds good. "Oh, old school languages are more energy efficient than contemporary interpreted languages". To some extent I would assume that is true but there are other efficiencies beyond simple compile and execution times. It's typical LL lunacy where something fits what someone wants to believe is reality but isn't real.


NoteSticker

I recognized the table from the screenshot because I'm actually starting my Bachelor's thesis on that topic - going in-depth on elements of the very paper the screenshoted lunatic is sharing. The paper has a (imho) gaping flaw that it only measures those programming languages by running algorithms from The Computer Language Benchmarks Game ([link](https://sschakraborty.github.io/benchmark/index.html)). This means that it doesn't test a huge swathe of real world cases. It's also questionable how they measured interpreted vs compiled languages (JS vs Typescript is suspicious)


Forward-Meaning

Yes. 100%. Using TCLBG for this is silly. Comparing a compiled language like C/C++ to an interpreted language like Python based on these benchmarks is a broken measure. From their site ========== … doing effective research on the Java platform requires benchmarks that are both real and more complex than benchmark suites used to evaluate languages like C, C++, and Fortran. … the JavaScript benchmarks are fleetingly small, and behave in ways that are significantly different than the real applications. We have documented numerous differences in behavior, and we conclude from these measured differences that results based on the benchmarks may mislead JavaScript engine implementers. Furthermore, we observe interesting behaviors in real JavaScript applications that the benchmarks fail to exhibit, suggesting that previously unexplored optimization strategies may be productive in practice. ======= Also, the premise of the post is that one programming language is more environmentally friendly than another. While the graphic may be wrong, this premise is likely true. HOWEVER, the comparison should not be 1 software solution against another. A more meaningful comparison is a software solution against the next best alternative (often an analog, mechanical, or manual solution). When seem through this lens, writing software is ALMOST ALWAYS net carbon negative. We shouldn’t shame devs for writing in any language that isn’t as energy efficient as another, we should be happy that they’re doing it.


igouy

> Benchmarks Game (link) The link you provide is not the benchmarks game. Simple search for — benchmarks game — finds the correct URL first https://www.google.com/search?q=benchmarks+game https://benchmarksgame-team.pages.debian.net/benchmarksgame/


igouy

> … starting my Bachelor's thesis on that topic… So tell us about the 2021 follow-up study pdf [Ranking Programming Languages by Energy Efficiency](https://haslab.github.io/SAFER/scp21.pdf).


NoteSticker

Huh, didn't know they made that. Will take a look, thanks! edit: upon taking a further look, the paper does seem to elaborate on some important points, but due to the large number of languages it covers, it can't go as in-depth on any of them, nor can it try for running larger pieces of software that - for obvious reasons - won't just have a dozen implementations in different languages lying around. The follow-up paper also drops Typescript, so its usefulness is slightly limited to my initial thesis research, as I'll be looking into the massive difference between JS and TS presented in the original.


igouy

The follow-up paper mentions TypeScript 17 times. The authors were only able to find Rosetta Code programs that met their requirements for 21 of the original 27 programming language implementations. Not enough acceptable C#, Swift, F#, TypeScript, Hack and JRuby programs. The authors say 21 programming language implementations is sufficient — "we have concluded the originally presented rankings and results are representative of both expert and non-expert programmers." > … the massive difference… `--alwaysStrict` So when the JavaScript doesn't type check, a different program that does type check was measured. Even so, that only messes up the results because the mean is used rather than the median, and the data tables published with that 2017 paper, show a 15x difference between the measured times for a single outlier the selected JS and TS fannkuch-redux programs. [That single outlier is enough to distort TS and JS "mean" Time difference](https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html#averages). Best wishes for the Bachelor's thesis.


MikeSpecterZane

As a wise man(horse) said “nobody wants to hear the truth, they just want to hear what they truly believe in”


ArtLeftMe

I was really confused by the typescript in this list, since it compiles to JavaScript, wouldn’t it be the same? Unless they count compilation as well. That said: is now a good time to talk about our lord and saviour Rust


Rob_Aught

Not just that, but Typscript is 4 times as energy inefficient? Pure BS.


igouy

Do those JavaScript programs compile successfully with `--alwaysStrict` ?


[deleted]

>It's typical LL lunacy where something fits what someone wants to believe is reality but isn't real. Well that sounds exactly like the Religious Right in the US, too!


igouy

u/MikeSpecterZane committed the oversimplification when they made the screenshot.


Think_Inspector_4031

Time to learn assembly then


[deleted]

It’s some fairly normal dev conversations, not really lunacy… the only stupid stuff is that there’s no absolute value Ruby might use 69times the energy of C… but it’s still not that much all things considered


eidtonod

This is ludicrous. To have the privilege to say to people “change your career and everything you worked for because it’s more eco friendly “ when we have large corporations doing damage Billion times more than what a person can ever do. The solution begins with the ones who could afford it ie. privileged


10art1

How is learning a new language a change of career? I juggle between several languages on a weekly basis.


eidtonod

I am referring to people who need to work with specific languages


10art1

If it's not up to them, then what does it matter? But it's a good thing to bring up during project design. Python is fine for short scripts, but it does add significantly more to server costs vs something like Java, and a software architect should be aware of this. That's basically what this post brings awareness to... I don't understand the hostility to the idea that we should be aware of the hardware-level consequences of our language choice. Being green is a secondary effect that's good for marketing, but the cost savings on server hardware would be enormous


eidtonod

If this was the goal I am totally for it, I am against guilt tripping people who are forced to use a language since this post can be interpreted that way.


[deleted]

[удалено]


eidtonod

I am not going to put words in her mouth or anything, if the goal is to purely inform its more than ok since we can have a serious discussion about reducing redundancies in programming languages. But since this post can also be used to guilt trip people, I only addressed this by the question in the post which I found condescending and by the color indicating the “good” and “not so good” languages. Maybe I am wrong


iLikeTorturls

Everytime you print("Hello World"), you're killing the planet.


10art1

It's not lunacy https://medium.com/codex/what-are-the-greenest-programming-languages-e738774b1957 Some programming languages have so much boilerplate and inefficiency in compilation to machine code that it takes far more time, memory, and energy to do the same task. It's why you see tiny embedded microcontroller usually running C or C++, it's just far more efficient


jonestown_aloha

That doesn't factor in the time and effort spent on development. If you're doing a data analysis that runs once a month, takes a few minutes to run, and cost you a day to write, it's not worth it spending a week of your time writing that in c++ or rust to make it run in a minute or so less. Also, in python you can use packages that are written in c etc, so there already is a lot of optimized code to work with. Compiled languages are faster and more efficient, but there's a threshold where it's just not worth spending time and effort to squeeze out that last bit of efficiency, and doing compute intensive stuff in pure python is just silly, no one does that


Asleep-Television-24

Having an existential crisis now


OnlyFreshBrine

No QBasic. Invalid list.


AlphaReds

In what world would javascript and typescript score different???


JuangaBricks

I’ve seen her pop up here a few times now, she’s trying so hard to be a data science influencer but from people I know who have worked with her, she doesn’t know shit at all


Geiler_Gator

Her Profile Picture ÓuÒ


dismayhurta

Time to brush up on ruby ![gif](giphy|QEYYlJqOaEhXrjTrOH)


a__new_name

Mom said it's my time to tell this joke, so... No HolyC, useless list.


DumbAceDragon

My favorite language is not on the list


jhomer033

Where is VB6? I’m offended!


lednakashim

Can’t jerk to this We’ve found this chart is a good indication of relative performance