3 ms·
Actually 3rd party libraries and application code is where .NET is likely to be faster unless node lib is wrapping a C library - .NET can easily beat JS an orde
by rubber_duck 9y ago
Actually 3rd party libraries and application code is where .NET is likely to be faster unless node lib is wrapping a C library - .NET can easily beat JS an order of magnitude simply by having control of memory layouts and high performance/specialized data structures. Meanwhile JS has crap structures (doesn't even have primitive arrays) and everything is it's dynamic object where you pray the JIT eventually figures out a constant structure and tries to optimize.
- UK-AL 9y agoYes, but if your going to compare(Badly in this case). You probably want to test it in isolation.
- Klathmon 9y agoJust to nitpick a bit, JS does have primitive arrays using TypedArray.
- rubber_duck 9y agoThis is a good point - it's also why you can still optimize JS on microbenchmarks but for real world code where you'd want to use an array of structs in say C# for eg. there's just no JS equivalent other than write obfuscated stuff around typed arrays.