Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance of .NET ILMerged assemblies

I have two .NET libraries: "Foo.Bar" and "Foo.Baz".
"Foo.Bar" is self-contained, while "Foo.Baz" references "Foo.Bar".

Assuming I do the following:

  • Use ILMerge to merge "Foo.Bar.dll" with "Foo.Baz.dll" into "Foo1.dll".
  • Create a new solution containing the entirity of both "Foo.Bar" and "Foo.Baz" (since I have access to their source code), and compile this into "Foo2.dll".

Will there be any differences in the performance of Foo1.dll and Foo2.dll when using their functionality from an external project? If so, how significant is this performance difference, and is it a once-off (on load?) or ongoing difference? Are there any other advantages or disadvantages with either approach?

like image 346
Matthew King Avatar asked Apr 22 '10 06:04

Matthew King


1 Answers

I'm sure it wouldn't produce exactly the same IL, but it would be extremely close and I can't imagine any appreciable difference between the two methods. Other than the fact that the ILMerge method is probably more convenient and maintainable, I think both solutions would have the same outcome.

like image 129
Josh Avatar answered Nov 08 '22 13:11

Josh