I save 100.000 Vectors of in a database. Each vector has a dimension 60. (int vector[60])
Then I take one and want present vectors to the user in order of decreasing sim
Uh, no?
You only have to do all 99,999 against the one you picked (rather than all n(n-1)/2
possible pairs), of course, but that's as low as it goes.
Looking at your response to nsanders's answer, it is clear you are already on top of this part. But I've thought of a special case where computing the full set of comparisons might be a win. If:
then you could pre-compute the as the data comes in and just lookup the results per pair at sort time. This might also be effective if you will end up doing many sorts...