3 ms·
How does "TypeScript" come out to an energy score of 21.50 when "JavaScript" has a score of 4.45 - that makes 0 sense.
by hn_throwaway_99 8y ago
How does "TypeScript" come out to an energy score of 21.50 when "JavaScript" has a score of 4.45 - that makes 0 sense.
- snek 8y agomaybe they included compilation? it would make sense as that's a real world use of cpu/memory/energy.
- hn_throwaway_99 8y agoBut it certainly looks like they didn't include compilation time for all of the compiled-to-machine-code languages. C has the reference value of '1'.
- jandrese 8y agoI think they included compile time if the code is JITed at startup.
- quickthrower2 8y agoWhat about the energy fixing bugs in JS that Typscript found at compile time?
- recursive 8y agoStill doesn't make sense. Build one time, run many times.
- kakarot 8y agoIf I'd hazard a guess before reading the article, it's because of the transpilation phase to regular Javascript. That doesn't come for free.
- prickledpear 8y agoTheir typescript compiler may not be targeting the correct ecmascript version so the typescript generated could be using polyfills instead of native features.