views:

689

answers:

6

I want to use an Object Relational Mapper (ORM) tool for my ASP.NET application. I have three options: NHibernate, LINQ to SQL, and Subsonic. Which one is fastest?

+1  A: 

There is no way to really answer this question without specific use cases. nHibernate has lots of functionality that allows you to optimize its performance (Fetching strategies, lazy loading, future queries etc).

JoshBerke
Partially agree. But it's possible to compare the performance on common subset of features. LINQ 2 SQL really does not support some useful optimizations - e.g. there are no future queries and no batch updates. But in general, it's very fast - partially, because it's slim.
Alex Yakunin
A: 

You should investigate/try each one and pick the tool that best fits your needs (i.e. featureset, ease-of-use, etc.).

Unfortunately, this is about the best answer you can get without providing a concrete example of what you trying to accomplish.

Jimmie R. Houts
A: 

Any time you add a layer you loose performance, but with ORM you gain time to market which in alot of cases is more important then anything, I personaly like LINQ to SQL or CodeSmith LINQ to SQL has a lot of customizations for performance and also allows the use o SP, the one key thing of my decision is integration with VS, if it does not integrate I prefer not to use it. One very important thing to keep in mind is performance is a big mith between developers, as long as the users are happy that is not an issue.

Oakcool
A: 

I've used NHibernate for a little and I think is a bit complicated. If your doesn't develop anything in Java I try to not use this ORM.

jaloplo
I think the question is geared towards .Net as NHibernate is the .Net version of Hibernate.
runxc1 Bret Ferrier
+7  A: 

See ORMBattle.NET, but pay attention to description of performance tests.

Spending some time on studying FAQ there is highly recommended as well.

Short answer: among these 3 LINQ to SQL is definite leader on reads, and NHibernate - on writes. IMHO Subsonic isn't best choice from any point (bad LINQ, bad performance).

Alex Yakunin