function [ext_dist] = calc_extrinsic_dist_fast(B1, B2); 

B = B1'*B2;
S = svd(B);

S_flag = (S < 1.0);

ext_dist = sqrt(sum(sum((acos(S).*S_flag).^(2))));

return;
% keyboard;
    






