MAINT: Faster preallocation and count with integer-type in `precision_recall`