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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top