Live data from Hacker News

Which Programming Languages Use the Least Electricity? (2018)

thenewstack.io

31–40 of 267 posts

Re: Which Programming Languages Use the Least Electricity? (2018)

#33
post #13

Earlier quoted context omitted.

I don't use Typescript, and use Javascript only for what I have to. I don't care about the ranking of either of them, I'm just pointing out a possible flaw in the methodology that should be taken into account when looking at the numbers presented, and what I suspect is a concrete example of that. This also isn't a criticism of the benchmark game, it's well known that not every implementation is equivalent in the time…

it is absolutely a flaw in the methodology, but one I think is unavoidable without enormous resources.

I agree. I just wanted to point it out in case people took the analysis as entirely accurate without looking a little closer. I suspect the entries towards the top of the list are fairly accurate, by nature of their competitive standing in the benchmark games and their focus as languages on performance. It's much easier for an implementation difference to hide in the natural drift you see in the languages with VMs and interpreters that don't receive as much attention.

That's actually one of the reasons why the TypeScript/Javascript divide jumped out at me. They were mentioning that the bottom of the list was dominated by interpreted languages, and mentioned TypeScript by name (which surprised my given the focus JavaScript VMs have gotten), and then when I reviewed JavaScript's standing (which was more in-line with what I expected), I noticed the difference between it and TypeScipt was very pronounced, which is odd when (to my knowledge) TypseScript compiles to JavaScript, and not because it's doing a lot of convenience stuff that would slow it down. That said, I don't use TypeScript, so maybe I'm overlooking something.

Re: Which Programming Languages Use the Least Electricity? (2018)

#34
post #22
post #14

Earlier quoted context omitted.

That’s an interesting discrepancy, I might have had the same gut reaction. But you’re using that assumption to cast slippery-slope doubt on the whole project without knowing anything specific. It’s possible you’re right, but maybe find out which algorithms are being used first? Perhaps there is a reason that TypeScript actually is an order of magnitude slower than JavaScript. The Benchmark Game project was specifical…

> you’re using that assumption to cast slippery-slope doubt on the whole project without knowing anything specific. No! I think this is a very useful project and analysis. I just think that some languages might have extremely optimized versions (or possibly more likely, some languages don't quite yet have that extremely optimized version that has propagated throughout the others) and that might be affecting specific…

> I did not know if my concern was correct, and wondered if it was, what else it might affect.

That’s exactly what I mean by casting doubt. If the concern might not be correct, why lead into speculation about further concerns?

Let’s find out what the actual reason that TypeScript is measured slower, rather than guess as what else could be wrong if unverified theoretical assumptions might be correct.

Re: Which Programming Languages Use the Least Electricity? (2018)

#35
Really silly to state how much electricity "languages" use without specifying implementations. You can specify for unstandardized languages, but languages don't have performance characteristics in the typical sense, implementations do, and this can very greatly between implementation.

Re: Which Programming Languages Use the Least Electricity? (2018)

#37
post #23

> A faster language is not always the most energy efficient My rule of thumb now is that memory access, not compute, is the primary consumer of energy. That would tend to confirm the above statement while also supporting the data that scripting languages aren’t super energy efficient, since they tend to do a lot more dynamic allocation than compiled languages, when generally broadly speaking about common programming…

This is probably true, but it would be incredibly cool to see a research project that demonstrates this.

Re: Which Programming Languages Use the Least Electricity? (2018)

#38

Not sure what to make of this research. It's not like I can switch out JS in favor of these other languages (many of which are compiled binaries) in my web apps. The performance of for example web servers written in the different languages entirely would seem more interesting to compare. The JS/TS comparison was directly fishy. I found no mention in the paper of how they managed to "run" the tasks in Typescript, whic…

Maybe you can switch it out :) https://webassembly.org/
Post reply on HN