Compare sorted lists instead of checking each member