A fast nearest neighbour algorithm with a logarithmic expected testing time for small feature sizes is presented. It has been tested on a robot vision application for YUV space. The algorithm time requirement is better than a multilayer perceptron trained for the same purpose.