Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

[release/3.1] Improve Expression.Lambda<TDelegate> performance (dotnet/runtime#32768) #42874

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,11 @@ public static Expression<TDelegate> Lambda<TDelegate>(Expression body, string na
{
ReadOnlyCollection<ParameterExpression> parameterList = parameters.ToReadOnly();
ValidateLambdaArgs(typeof(TDelegate), ref body, parameterList, nameof(TDelegate));
return (Expression<TDelegate>)CreateLambda(typeof(TDelegate), body, name, tailCall, parameterList);
#if FEATURE_COMPILE
return Expression<TDelegate>.Create(body, name, tailCall, parameterList);
#else
return ExpressionCreator<TDelegate>.CreateExpressionFunc(body, name, tailCall, parameterList);
#endif
}

/// <summary>
Expand Down