further optimisations which reduce num of allocs

Basically trying to remove the number of calls to alloc by preserving
the score array for the duration of the call to find_best_match