Thanks rjuyal
@OP, Just a quick....
When optimizing such code,
The fastest loop that i've ever read is the while loop that compares the value to zero. second is the boolean.
while( something != 0){ ... }
while( true ){ ... }
Any other process that can just initialize once, put them away from the loop.
while( something != 0){
Double d = value / ( 3 + 2 * 3);
Something executes
}
instead,
Double d;
Double t1 = 9.0 ( MDAS rule )
while( something != 0){
d = value / t1;
Something executes
}
My example really too far from the given codes, but you can get some ideas... ( i hope )