2 ms·
Your comment caught me by surprise. For one, I am under the understanding that strongly typed languages like C# and Java, are optimally compiled to bytecode su
by kumarvvr 6y ago
Your comment caught me by surprise.
For one, I am under the understanding that strongly typed languages like C# and Java, are optimally compiled to bytecode such that the overhead of running in a VM is minimal and performance is comparable to native code.
I maybe wrong, I dont have a up to date knowledge of JS runtime and optimizations, but for such a dynamic, loosely typed language, there is only so much AOT and optimization you can do. V8 might have bridged that gap a fair bit, but is nowhere close to performance of C#.
However, in almost all benchmarks, for real world use cases, .net always trumps JS runtimes.Also, a developer needs a high level of awareness and knowledge of underlying systems in JS to write performant code. The same is not true with C#, in the sense that as a seasoned developer, the strongly typed nature of C# mostly saves me from writing poorly performing code. I dont have to worry too much about underlying mechanisms in C#.
Edit : https://stackoverflow.com/questions/35457486/performance-and-memory-differences-between-c-sharp-and-javascript https://stackoverflow.com/questions/35457486/performance-and...
I found this. So, a program made for performance comparision between C# and JS would probably be equally fast in both. However, JS loses performance in real world due to its dynamic typing.