views:

725

answers:

2

Are there any IQueriable implementaions for linq-to-objects that perform better than the default O(n) linear search performance that you get when calling myEnumerable.AsQueriable()?

I've had a look at http://www.codeplex.com/i4o/ which has better performance, but seems to rely on using extension methods on IndexedCollection rather than making IndexedColleciton implement IQueriable.

I'm keen to keep my interface returning IQueriable<T> as I don't want anyone to know whether they are hitting a cache or a db.

+1  A: 

you might want to have a look at plinq http://msdn.microsoft.com/en-us/magazine/cc163329.aspx

John Boker
True, but in many ways parallelisation is a last resort (with throw more hardware at it) - if I can index the properties I'm linqing on then we should be able to get one / two orders of magnitude improvement by using a IQueriable backed by a less naive datastructure.
Squirrel
A: 

Another answer might be to back it by an in memory object database like: db4o

Squirrel