Re:Energy Efficiency Across Programming Languages
by jsd1982 on Thursday September 14, 2017 @06:34PM
(#15253047)
Typescript is not its own language in terms of having a distinct runtime from Javascript so it has no performance difference and does not make sense to appear in this comparison.
I can see comparing different target versions of Javascript against one another (es2015 vs es2017 for instance), but it all depends on the VM chosen as well.
Re:Energy Efficiency Across Programming Languages
by ashark on Thursday September 14, 2017 @06:52PM
(#15253141)
Exactly. The difference at least some of these tests is measuring between the two is idiomatic modern JS (promise, map, careful variable scoping) with fast & loose old-school c-like JavaScript (for loops, global vars galore). Typescript has little to do with it.
Re:Energy Efficiency Across Programming Languages
by sitkack on Friday September 15, 2017 @02:12AM
(#15255012)
Typescript can use only of these, so it does make sense to have it on the list. Clearly it doesn't fall right next to JavaScript in the results. It is a benchmark of language implementations not runtimes. This is why JRuby, C# and F# are on the list, one uses the JVM and the latter two both use the CLR. Different languages.
Take a look at some of the TypeScript code and compare it to the Javascript versions. At least some are way different, i.e. the TypeScript uses "modern" JS features and the JS version... looks about as much like C as it can.