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 nof 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.

}