My colleague was trying to do performance testing on function calls in
assembly verses calls to external assemblies (dll's). He said, he made a
function in VB.NET inside of a DLL project, and compiled it.
The function does nothing, and returns a boolean. He opened a separated
Windows Forms project, referenced the DLL project and create the same simple
function as a private function in the winforms project. Then he called each
of them several times to test time of execution.
He was surprised that the call to the DLL was faster than the one to the
local function. I haven't seen the test, but didn't know why this would be.
Of course we aren't talking about a great time difference but it was
puzzling. Could it be that the DLL gets put in the GAC and the winforms app
doesn't and this would give it some sort of performance gain?
Any thoughts would be appreciated.
Thanks,
Shane