|
-
February 15th, 2004, 08:48 AM
#1
Optimization
Iam dealing with a project that involves code optimization and have a question
on static variables
This is a function that calculates realtime information based on real time data.So this function will
be called as long as we get real time data and the no f times called may be enormous.
Does making these double variables static, improve CPU Performance?
void calculateData()
{
static double dDtScaleMin=m_TimeScaleAttr.GetDataScaleMin();
static double dDtScaleMax=m_TimeScaleAttr.GetDataScaleMax();
static long dtBoundMin=m_TimeScaleAttr.GetDataBoundMin();
static long dtBoundMax=m_TimeScaleAttr.GetDataBoundMax();
static double dtDiffScaleMinMax=dDtScaleMax-dDtScaleMin;
Do some other calculations with the above mentioned double values.
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|