Linq query performance improvements As I am getting my Linq query to a functional point, I start looking at the query and think about all the "ANY" and wonder if those should be a different method and then I have data conversions going on.

Does anything jump out as being a performance issue? What is recommended to make this more performant? (Yes, I need all the &amp;&amp;.)

etchVector =
    from vio in list
    where excelViolations.Any(excelVio =&gt; vio.VioID.Formatted.Equals(excelVio.VioID.ToString()))
    &amp;&amp; excelViolations.Any(excelVio =&gt; vio.RuleType.Formatted.Equals(excelVio.RuleType))
    &amp;&amp; excelViolations.Any(excelVio =&gt; vio.VioType.Formatted.Equals(excelVio.VioType)) 
    &amp;&amp; excelViolations.Any(excelVio =&gt; vio.EtchVects.Any(x =&gt; x.XCoordinate.Equals(excelVio.XCoordinate)))
    &amp;&amp; excelViolations.Any(excelVio =&gt; vio.EtchVects.Any(y =&gt; y.YCoordinate.Equals(excelVio.YCoordinate)))
    select new EtchVectorShapes
    {
        VioID = Convert.ToInt32(vio.EtchVects.Select(x =&gt; x.VioID)),
        ObjectType = vio.EtchVects.Select(x =&gt; x.ObjectType).ToString(),
        XCoordinate = Convert.ToDouble(vio.EtchVects.Select(x =&gt; x.XCoordinate)),
        YCoordinate = Convert.ToDouble(vio.EtchVects.Select(x =&gt; x.YCoordinate)),
        Layer = vio.EtchVects.Select(x =&gt; x.Layer).ToString()      
    };
You can definitely optimize this query. If list has M items and excelViolations has N items, the query will iterate excelViolations M*5N times.

It is possible to reduce this to M*N iterations by consuming excelViolations only once per item in list. You can do this with a subquery on excelViolations that checks all five conditions for each excelVio, then ORs each of the five conditions across all excelVio instances.

If that is not clear, hopefully this walkthrough is:

from vio in list

// Perform all five checks for each excelVio

let checks = excelViolations
    .Select(excelVio =&gt; new
    {
        HasVioID = vio.VioID.Formatted.Equals(excelVio.VioID.ToString()),
        HasRuleType = vio.RuleType.Formatted.Equals(excelVio.RuleType),
        HasVioType = vio.VioType.Formatted.Equals(excelVio.VioType),
        HasXCoordinate = vio.EtchVects.Any(x =&gt; x.XCoordinate.Equals(excelVio.XCoordinate)),
        HasYCoordinate = vio.EtchVects.Any(y =&gt; y.YCoordinate.Equals(excelVio.YCoordinate))
    })

// From left to right, OR each of the five results (equivalent to .Any)

    .Aggregate((left, right) =&gt; new
    {
        HasVioID = (left.HasVioID || right.HasVioID),
        HasRuleType = (left.HasRuleType || right.HasRuleType),
        HasVioType = (left.HasVioType || right.HasVioType),
        HasXCoordinate = (left.HasXCoordinate || right.HasXCoordinate),
        HasYCoordinate = (left.HasYCoordinate || right.HasYCoordinate)
    })

// Filter to only those that pass every check

where checks.HasVioID
    &amp;&amp; checks.HasRuleType
    &amp;&amp; checks.HasVioType
    &amp;&amp; checks.HasXCoordinate
    &amp;&amp; checks.HasYCoordinate

// Same projection

select new EtchVectorShapes
{
    VioID = Convert.ToInt32(vio.EtchVects.Select(x =&gt; x.VioID)),
    ObjectType = vio.EtchVects.Select(x =&gt; x.ObjectType).ToString(),
    XCoordinate = Convert.ToDouble(vio.EtchVects.Select(x =&gt; x.XCoordinate)),
    YCoordinate = Convert.ToDouble(vio.EtchVects.Select(x =&gt; x.YCoordinate)),
    Layer = vio.EtchVects.Select(x =&gt; x.Layer).ToString()
};