I want to optimize my byte code using -O option, but when I compile a
program whith optimization chance, the bytecode is the same than the
program bytecode whitout optimization.
For example:
I understand, if I write this program:
Date a,b,c,d;
long Iprim,Fprim;
int arreglo[]= new int [5000000], k=3, f=1500, p=9;
int operacion[]= {1,2,3,4,5};
public Opciones_Compilador(){
int longi=arreglo.length, i, j=0;
a= new Date();
Iprim=a.getTime();
for (i=0;i<longi;i++){
arreglo[i]= operacion[j++] + i*i + (f*k)*(f*k);
if (j==5)
j=0;
}
}
...
when the optimization is executed , I was expecting than the
constant expression (f*k) is displace for one compute and the
variable p (is never used) is not processed in the bytecode but
don't. ¿What happen?. ¿Do I not underestand the -O option?