Performance Issues

  • Thread starter Thread starter Champika Nirosh
  • Start date Start date
C

Champika Nirosh

Hi,

I have written a sperate appliaction for error logging and now I have two
options

one is to create a dll and give it to fellow developer and allow them to add
the reference while keeping the dll in the working folder

or

give them the cs file so then they can add (the code itself) it to their
solution and use it

Let me have some explaination (strick) on performance gain or loose of each
of these method.

Nirosh.
 
Having a separate dll when you can have the code itself is not a good
option. Many reasons: different versions then have to be strictly
maintained.. if the version of the client changes, JIT will not be able
to do many optimizations it does with code that have the same versions
(for example inlining methods).. furthermore, there are many other JIT
optimizations that can be easily performed if code is in the same file
because then the JIT compiler is at liberty to move around data and
instructions to get the best out of it while with separate dlls, it
won't be able to do so... (as many other applications can be using that
dll at the same time and changing or moving data around in that dll
would be a no-no). Again, the point is that if you *can* have the code
in one file and you don't need to share that code with many
applications, then you should definitely go for the other option (of
including the code).. but if you have other plans then go for the dll :)

-Andre
 
Yes Andre I am of course 100% agree with you, not one of my fellow developer
though and I just wanted some calrification I mean some tech. points

furthermore, there are many other JIT optimizations that can be easily
performed if code is in the same file because then the JIT compiler is at
liberty to move around data and instructions to get the best out of it while
with separate dlls, it won't be able to do so...

Could you please get me some more data on what you have said above.. that is
the point I need to know what are these optimization ...??

could you pls get me a link to get more data (if possible)

Thanks for the info you have given so far

Nirosh
 
What u have said is also enough
Thanks
Nirosh.

Andre said:
Actually I don't rememebr the list of things the JIT does but you can
find this on MSDN (there are actually a couple of articles online that
give you a 'short' list of things the JIT compiler does). I'm sorry I
can't be of much more help :(

-Andre
 
Back
Top