Optimize the expression.Evaluate() method for common scenarios such as understanding user provided expressions in 'A.CallTo()' and 'WithConstructorArguments()'. The problem with Expression.Lambda(expression).Compile() is it is quite heavyweight - it creates a lot of throwaway objects new lambda expressions and delegates, in order to invoke them just once. There are some nice performance wins by not doing that, even just for very simple expressions, like everybody's favorite - accessing a local variable.
Optimize the expression.Evaluate() method for common scenarios such as understanding user provided expressions in 'A.CallTo()' and 'WithConstructorArguments()'. The problem with Expression.Lambda(expression).Compile() is it is quite heavyweight - it creates a lot of throwaway objects new lambda expressions and delegates, in order to invoke them just once. There are some nice performance wins by not doing that, even just for very simple expressions, like everybody's favorite - accessing a local variable.

FakeItEasy/FakeItEasy,thomaslevesque/FakeItEasy,adamralph/FakeItEasy,thomaslevesque/FakeItEasy,blairconrad/FakeItEasy,blairconrad/FakeItEasy,adamralph/FakeItEasy,FakeItEasy/FakeItEasy