"Vitaly Budovski" vbudovski@gmail.com wrote:
Make use of the Triangle Inequality Nearest Neighbour algorithm to find the nearest colour more efficiently than a simple linear search. The improvements are most noticeable with a palette of 256 colours. Testing shows approximately 3-4x performance increase for 256 colours.
Now that you got rid of sqrt calls usage of float numbers internally doesn't look justified (to me) anymore.