Is constructing and using a manual lookup (ILookup<T>
) approach any faster than using a join with Join
or GroupJoin
on a local IEnumerable<T>
sequence in LINQ?
I read somewhere that the compiler actually translates the inner sequence of Join
and GroupJoin
to ILookup<T>
anyway.
What would ILookup<T>
benefits of using it on it's own be?
It depends. If you're working with objects that are DataContext based, then the join gets translated all the way down into the SQL server via the select statement. IF its a POCO (or more specifically a Plain Old CLR collection) or something else, then yes, its utilized as ILookup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With