4 ms·
I wrote a blog post with the correct node.js version: http://guillaume86.calepin.co/dotnet-vs-nodejs-performance.html http://guillaume86.calepin.co/dotnet-vs-no
by Guillaume86 14y ago
I wrote a blog post with the correct node.js version:
http://guillaume86.calepin.co/dotnet-vs-nodejs-performance.html http://guillaume86.calepin.co/dotnet-vs-nodejs-performance.h...
The big performance hit for the node version is the float conversion.
Multithreaded .NET version is a bit harder to write because usually this work is delagated to ASP.NET/IIS.
UPDATE: the .NET version is actually already multithreaded because of the Task system, so Node.JS seems to be actually faster in this scenario...
- Maarten88 14y agoI ran it too and came to the same conclusion: problem in the original comparison is that CPU usage of the node version never gets over 40% on my laptop, while the .NET version uses 100%. Using Array.sort() makes little difference. Adding threads to the node version does. I think also adding threads to the .net version wont help it much; it already uses 100% CPU.
- Guillaume86 14y agoGood idea to look at the CPU usage. To be complete I should show CPU/Memory usage under load but I've already spent enough time on this ;).