Cythonized version of log_score_assignments and sum_log_score_assignments