in reply to AoH sort & search
Check first comment in Sorting AoH by two keys for good explanation how it works.