Faster Way of Comparing Generic Sets
It seems you are iterating the sets a lot with the Except method and possibly the ToArray.

Consider iterating the sets at most once:

public static bool SetEqual&lt;T&gt;(this IEnumerable&lt;T&gt; source, IEnumerable&lt;T&gt; other, IEqualityComparer&lt;T&gt; comparer = null)
{
    if (source == null)
        throw new ArgumentNullException("source");

    if (other == null)
        throw new ArgumentNullException("other");

    if (source is ICollection &amp;&amp;
        other is ICollection &amp;&amp;
        ((ICollection)source).Count != ((ICollection)other).Count)
        return false;

    HashSet&lt;T&gt; set;
    if (comparer == null)
        set = new HashSet&lt;T&gt;(source);
    else
        set = new HashSet&lt;T&gt;(source, comparer);

    return set.SetEquals(other);
}


Source IEnumerable implementation.