Live data from Hacker News

.NET and Node.JS – Performance Comparison

salmanq.com

21–30 of 119 posts

Re: .NET and Node.JS – Performance Comparison

#24
Another "hey look, node.js isn't good at everything" post. I figured these would have stopped by now.

Why are you using an async sort function when you're not doing anything asynchronous in the sort callback? That's going to entail some overhead obviously, and it also can't take advantage of the sort optimizations v8 implements. Are you trying to show the overhead the asynchronous sort entails? Any overhead it causes would be easily outweighed by whatever asynchronous IO it's doing in that sort function anyway. It is negligible in comparison: not even worth pointing out.

> The key point I want to make is that I am using the async NPM instead of the default blocking Array.Sort.

I don't think you realize how this works. That async sort function is there to help deal with sort callbacks that already have to do something asynchronous. You're doing something synchronous and using that async sort function for no reason. If you're going to run these benchmarks, use the synchronous sort which can take advantage of certain optimizations. Or, you can also just do something actually asynchronous, which would justify using an async sort in the first place.

Re: .NET and Node.JS – Performance Comparison

#25
post #13

Earlier quoted context omitted.

Unless you can point to something incorrect or unfairly biased in that article - why does this matter?

Because .NET is Microsoft's baby? How is this not a huge conflict of interest? At the very least, he should put a disclaimer of that conflict somewhere in the article.

Are you insinuating that there is deception being used here? or an inaccuracy? If the blog post was by a node contribute, would you cry foul for that as well? how about giving some counter points against the substance of the blog instead of just attacking the author's credibility based on where he is employed. I am guessing that since you cannot disagree with what was actually said and done by the author, you are grasping at the default fallacy of attacking his character and honesty.

Re: .NET and Node.JS – Performance Comparison

#26
post #20
post #6

Earlier quoted context omitted.

I don't program in nodejs but this is wrong on so many levels. First an honest question: what exactly is it that nodejs is terrible at? Please define it. Now granted every tool has its strengths and weaknesses this benchmark shows a very large difference in operations that aren't uncommon in web servers. Sorting in memory should concern you, since caching happens in the memory. Again, I don't know the state of ORM te…

It wasn't wrong on many levels. - For very obvious reasons, JS (or Python or Ruby) would be slower than Java, C# at number crunching. - Node.js would handle concurrent connections better than most Asp.Net apps since the framework is non-blocking. Now you could write non-blocking code with .Net, but that isn't how most people write Asp.Net code. OTOH, with Node.js that's the only way you could write an app. - I am imp…

So you are saying that nodejs is slower in general, and .NET is slower when people don't know how to program in .NET.

To add on top of that, mvc 4 has extremely easy ways to set up async controllers/tasks. However, these are not needed or even WANTED most of the times. They are only really needed in I/O operations, a sector in which .NET excels anyway since you can get ORM magic happening easily.

Also, don't think non-blocking is really non-blocking. What can nodejs when it's waiting for the SQL lock to be lifted? (If there is any)

Re: .NET and Node.JS – Performance Comparison

#27
post #24

Another "hey look, node.js isn't good at everything" post. I figured these would have stopped by now. Why are you using an async sort function when you're not doing anything asynchronous in the sort callback? That's going to entail some overhead obviously, and it also can't take advantage of the sort optimizations v8 implements. Are you trying to show the overhead the asynchronous sort entails? Any overhead it causes…

[deleted]

Re: .NET and Node.JS – Performance Comparison

#28
A common cause of slowness in .net web app is multiple database round trips during a single request, all happening in sequence. You can write async database calls in .net but they're not the standard / path of least resistance, and by the time you app is hitting these issues, refactoring it all is a big undertaking.

The results do not surprise me, but what I find more interesting is how different ecosystems and frameworks can encourage your average developer to write scalable or non-scaleable apps. And I still think node's model has a lot going for in this regard.

Re: .NET and Node.JS – Performance Comparison

#29
post #4

The author notes about himself: > I work for Microsoft as a software engineer for Bing in Silicon Valley. My group specializes in building platform and experiences for consumers. ( http://www.salmanq.com/ )

Unless you can point to something incorrect or unfairly biased in that article - why does this matter?

It's a benchmark of .Net's Array.Sort to NPM's third-party async.sortBy, not a benchmark of .Net to Node, and the test does not make sense: async.sortBy is used to sort an array on an asynchronous function, it does not perform an asynchronous sort (which is what the asynchronized Array.Sort does)
Post reply on HN