Improve the KMean process performance by changing from using double
value distance to int value distance (the performance improves around
70%)