Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/31/11 11:37:45 (14 years ago)
Author:
mkommend
Message:

#1418: Removed calls to IEnumerable.Count() in performance critical sections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectiveOverfittingAnalyzer.cs

    r5882 r5907  
    2020#endregion
    2121
     22using System.Collections.Generic;
    2223using System.Linq;
    2324using HeuristicLab.Analysis;
     
    2829using HeuristicLab.Parameters;
    2930using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    30 using System.Collections.Generic;
    3131
    3232namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
     
    7878      // evaluate on validation partition
    7979      IEnumerable<int> rows = GenerateRowsToEvaluate();
    80       if (rows.Count() <= 0) return base.Apply();
     80      if (!rows.Any()) return base.Apply();
    8181
    8282      IExecutionContext childContext = (IExecutionContext)ExecutionContext.CreateChildOperation(EvaluatorParameter.ActualValue);
Note: See TracChangeset for help on using the changeset viewer.