Quote Originally Posted by ChrisW67 View Post
Are you calculating the hamming distance between the values in two columns of the same record, or between a candidate iris code and each of three columns in each record?
It's between a candidate and each of the three columns in each record.

If it is the former then you only ever need do this once and store the result.
I didn't get you.

Have you profiled your code to make sure that it is not the hamming distance algorithm that is chewing the time? Don't waste time optimising something that is not the biggest problem.
The matching routine is really fast.
My initial doubt was if I have to copy all database entry in memory and performing the matching there instead of doing n queries against the database.

It is possible to provide an extension to Sqlite to give it the hamming_distance function it does not currently have. This is will be more efficient than dragging the data through Qt's Sql layers but is obviously another bunch of APIs to learn.
Here we're using microsoft sql express 2005.
Regards