My current understanding is that \'hard coded\' code like this:
public int Add(int x, int y) {return x + y;}
will always perform better tha
Your Add
function probably compiles to some function overhead (if not inlined) and a single add instruction. Doesn't get any faster than that.
Even constructing this expression tree is going to be orders of magnitude slower. Compiling a new function for each invocation is going to be incredibly expensive compared to the direct C# implementation.
Try compiling the function just once and storing it somewhere.