2013年6月26日
摘要: 1、减少不必要的循环层数。 例如,求股票 n日ma值。 在最内层每次循环n次求和求平均。其实这层的循环可以省略。 1 for(int j=0;jday[j]-1)15 {16 sum[j]-=(*(pt_Stock_test-day[j]+i)).m_lClosePrice; 17 (*(pt_Ma+i)).ma[j]=sum[j]/day[j];18 }19 }20 21 }View Code 2、多重循环 把循... 阅读全文
posted @ 2013-06-26 18:23 黑色圣光 阅读(250) 评论(0) 推荐(0) 编辑