performance tweak

compute the log-likelihood slightly faster