enhancement: now compute_labels() scales to very large datasets