cross-posted from: https://lemmy.world/post/31184706
C is one of the top languages in terms of speed, memory and energy
https://www.threads.com/@engineerscodex/post/C9_R-uhvGbv?hl=en
cross-posted from: https://lemmy.world/post/31184706
C is one of the top languages in terms of speed, memory and energy
https://www.threads.com/@engineerscodex/post/C9_R-uhvGbv?hl=en
Not really, because this stuff also happens: https://stackoverflow.com/questions/20278095/enums-in-typescript-what-is-the-javascript-code-doing a function call always has an inpact.
Yeah sure, you found the one notorious TypeScript feature that actually emits code, but a) this feature is recommended against and not used much to my knowledge and, more importantly, b) you cannot tell me that you genuinely believe the use of TypeScript enums – which generate extra function calls for a very limited number of operations – will 5x the energy consumption of the entire program.
This isn’t true, there are other features that “emit code”, that includes: namespaces, decorators and some cases even async / await (when targeting ES5 or ES6).