distance evaluation 2000x faster in C; 1.5us C vs 3.2ms python