I like to tinker with Node.js. Ted Dziuba doesn’t anymore. He thinks node.js is a cancer.
Obviously, a few people disagree – Joshua Kehn and Brian Beck. Ignoring all issues of relevance or flaimbait…and even ignoring all issues of original intent of the article, I was curious to see how C# under ASP.NET MVC3 fared in this little shootout.
I set up a simple MVC application. One controller. It looks like this:
public class HomeController : Controller
{
private int Fib(int? n){
if (n < 2)
{
return 1;
}
else
{
return Fib(n - 2) + Fib(n - 1);
}
}
public string Index(int? n)
{
if (string.IsNullOrEmpty(n.ToString()))
{
n = 2;
}
return Fib(n).ToString();
}
}
I ran it on an instance of IIS6.
$ time curl http://localhost/?n=40 default real 0m0.343s user 0m0.015s sys 0m0.015s
Not too bad really. Haskell, however, is super duper fast – as Mathias Biilmann shows.
There’s a little fun for a Tuesday morning.
Sorry, the comment form is closed at this time.