473,402 Members | 2,046 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Performance benefit to using constants

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.
Nov 15 '05 #1
1 1076
AFIAK, Constants are interned immediately and will provide a benefit over
dynamic declarations.
"Doug" <dn******@dtgnet.com> wrote in message
news:ff**************************@posting.google.c om...
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.

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rolan | last post by:
To those that have been around Access long enough, I'm sure that insight can be shared as to what aspects of computer processing speed improves its performance. Perhaps in some respects even...
4
by: Bob Alston | last post by:
Some more, rather specific Access performance questions. IN a split front-end & back-end Access/Jet ONLY LAN situation, and with all query criteria fields and join fields indexed: 1. Is is...
3
by: farseer | last post by:
if an enum requires boxing often, i'd assume constants would win on performance, is that true? Further, it appears that if you need to pass enum values to functions that accept only uint, int or...
2
by: Kurt Schroeder | last post by:
is there a performance benifit to using code behind?
11
by: A Traveler | last post by:
I was just curious if anyone knows how the combinations of And/AndAlso and Or/OrElse compare in terms of performance. Which takes more work for the system, performing two evaluations on an And or...
4
by: Frank Villasenor | last post by:
Hello Everyone, Regarding stored procedures and views, I know that stored procedures cause SQL Server to create a cached execution plan. Is the same thing done for views? Also, how bad is the...
7
by: Michael D. Ober | last post by:
When calling Enqueue, the internal array may need to be reallocated. My question is by how much? In the old MFC array classes, you could tell MFC how many additional elements to add to the array...
12
by: lali.b97 | last post by:
Somewhere in a tutorial i read that if statement has performance overheads as code within the if statement cannot take benefit of pipeling of microprocessor and also that the compiler cannot...
13
by: William McBrine | last post by:
Hi all, I'm pretty new to Python (a little over a month). I was wondering -- is something like this: s = re.compile('whatever') def t(whatnot): return s.search(whatnot)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.