| ▲ | dbdr an hour ago | |||||||
This paper is relevant: Energy Efficiency across Programming Languages: How Does Energy, Time, and Memory Relate? https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/pap... This is the main summary table: | ||||||||
| ▲ | DanRosenwasser 6 minutes ago | parent | next [-] | |||||||
The methodology used in this paper was extremely bad. There is no reason there should be any disparity between a TypeScript and JavaScript benchmark. Unfortunately it has continued to make the rounds for about a decade now and gets re-posted every year or so. | ||||||||
| ▲ | lionkor an hour ago | parent | prev | next [-] | |||||||
Any comparison with Lua that doesn't include LuaJit also shouldn't include any JavaScript (or rather, should test it with some super inefficient ancient runtime instead of V8) | ||||||||
| ▲ | qsort 39 minutes ago | parent | prev | next [-] | |||||||
I don't know what this table is supposed to measure but it doesn't check out. (C, C++) and (JS, TS) are almost source-compatible, chances are you can rename test.c to test.cpp and test.js to test.ts and you're done. Yet they're showing massive differences? Also most of the compiled languages with no runtime should get results that are very close to each other: good compilers should produce similar object-code for this type of microbenchmark. Not to mention this is really measuring the implementation, you can't measure a language. Mike Pall wouldn't be down there, and JS/TS wouldn't be up there without V8 and friends. | ||||||||
| ||||||||
| ▲ | misja111 an hour ago | parent | prev | next [-] | |||||||
Why didn't they include assembly? IMO this should be the benchmark, not C | ||||||||
| ||||||||
| ▲ | piokoch 24 minutes ago | parent | prev | next [-] | |||||||
I have to say I am surprised that Java is better than Go in terms of energy/time. | ||||||||
| ▲ | Zababa an hour ago | parent | prev [-] | |||||||
This paper is not really relevant, it's based on the "Computer Language Benchmark Game", so what it measures is a mix of the efficiency/speed of the language and the attention that practitioners of that language gave to the Computer Language Benchmark Games. What is measured in that table is neither naive code nor the absolute limit you can reach with each language, which means you can't really then compare languages between themselves the way the paper implies. I think picking professionals at random that practice those languages and ask them to write Computer Language Benchmark Games code would be maybe a bit more representative, but even there you face huge biases. | ||||||||