Improve victor_purpura_dist performance.

Speed-up factor is about 10 to 16.