eucldist: some optimizations made. It improved in ~10% the Speedup