85
C is one of the most energy saving language
(lemmy.world)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Ah this ancient nonsense. Typescript and JavaScript get different results!
It's all based on
https://en.wikipedia.org/wiki/The_Computer_Language_Benchmarks_Game
Microbenchmarks which are heavily gamed. Though in fairness the overall results are fairly reasonable.
Still I don't think this "energy efficiency" result is worth talking about. Faster languages are more energy efficient. Who new?
Edit: this also has some hilarious visualisation WTFs - using dendograms for performance figures (figures 4-6)! Why on earth do figures 7-12 include line graphs?
It does make sense, if you skim through the research paper (page 11). They aren't using
performance.now()
or whatever the state-of-the-art in JS currently is. Their measurements include invocation of the interpreter. And parsing TS involves bigger overhead than parsing JS.I assume (didn't read the whole paper, honestly DGAF) they don't do that with compiled languages, because there's no way the gap between compiling C and Rust or C++ is that small.
But TS is compiled to JS so it's the same interpreter in both cases. If they're including the time for
tsc
in their benchmark then that's an even bigger WTF.