正在加载图片...
General Optimization Techniques Code motion Invariant expressions should be executed only once E.g for (int 0; 1< xlength; 1++) x[i] * Math PI Math Cos( double picosy= Math. PI Math cos(y) for (int i=0; i<x length; i++) 区[i]*= piCOs Fa|2011 Advanced Compiler techniques9 Fall 2011 “Advanced Compiler Techniques” General Optimization Techniques ◼ Code motion ◼ Invariant expressions should be executed only once ◼ E.g. for (int i = 0; i < x.length; i++) x[i] *= Math.PI * Math.cos(y); double picosy = Math.PI * Math.cos(y); for (int i = 0; i < x.length; i++) x[i] *= picosy;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有