# HG changeset patch # User Chris Cannam # Date 1399455501 -3600 # Node ID 6890dea115c31e0c93a7172f7e2a16d91c65ac51 # Parent 36f58a5391257fdd576ef3f2ccfd1860bfc0cc15 Eliminate a loop diff -r 36f58a539125 -r 6890dea115c3 src/EM.cpp --- a/src/EM.cpp Wed May 07 10:00:39 2014 +0100 +++ b/src/EM.cpp Wed May 07 10:38:21 2014 +0100 @@ -206,9 +206,8 @@ v_copy(contributions, w, m_binCount); v_multiply(contributions, m_q, m_binCount); - v_scale(contributions, factor, m_binCount); - double total = v_sum(contributions, m_binCount); + double total = factor * v_sum(contributions, m_binCount); if (n >= m_lowestPitch && n <= m_highestPitch) {