Performance benefit to using constants

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

This may sound like a silly or odd question but I was wondering if
there is any performance benefit to using constants? I have a lot of
string constants I created in a component and am wondering if it is
even necessary - since many of them are only used in one place - but
if there is a performance benefit to using the constant versus the
string than I can see keeping them as is.
 
AFIAK, Constants are interned immediately and will provide a benefit over
dynamic declarations.
 
Back
Top