not knowing how maxLength is involved in your compare_fingerprints(): what about pre-selecting a range of fingerprint fullfilling e.g. +/- 10% of audio llength and thereby reducing the number of comparisons?
it apears to be the essencial thing to reduce loop count, as 10mio is really >many< for all scripting languages.
Second thought is, that a fingerprint doesn't appear to be a first choice for similarity comparisons as it has to be regarded as a more or less "random" id. So: what does your compare func really do?
Even if it doesn't do much but compare the length and check for equality of fprints, its a lot of overhead just to handle the 4 (!!!) parameters 10mio times. So, can you rethink the concept of your compare func?