Polyhedron tests on Intel Darwin8/9

Paul Thomas paulthomas2@wanadoo.fr
Mon Nov 26 20:01:00 GMT 2007


Dominique,
> Replacing
>
>                   denominator = sqrt(dot_product(rot_c_vector-rot_q_vector,                 &
>                                                  rot_c_vector-rot_q_vector))
>
> with
>
>                   denominator = sqrt((rot_c_vector(1)-rot_q_vector(1)) * &
>                                      (rot_c_vector(1)-rot_q_vector(1)) + &
>                                      (rot_c_vector(2)-rot_q_vector(2)) * &
>                                      (rot_c_vector(2)-rot_q_vector(2)) + &
>                                      (rot_c_vector(3)-rot_q_vector(3)) * &
>                                      (rot_c_vector(3)-rot_q_vector(3)))
>                   l12_lower = l12_lower + numerator/denominator
>   
You have read my mind! Following our exchanges, I have just been 
contemplating how to do this for n <= 3.
>                   numerator = w1gauss(j) * w2gauss(k) *                                     &
>                               (coil_current_vec(1)*current_vector(1) + &
>                                coil_current_vec(2)*current_vector(2) + &
>                                coil_current_vec(3)*current_vector(3))
>
> further decrease the execution time to
>
> 65.560u 0.080s 1:05.64 100.0%	0+0k 0+1io 0pf+0w
>
> Although I may understand that the first optimization is missed, I don't 
> understand why the second is missed if the dot product is inlined.
>
>   
I believe that the loop has been in-lined and then not un-rolled for 
some reason.

I'll let you know how I get on.

Cheers

Paul



More information about the Fortran mailing list