Test whether removing a cast still hurts performance.

BUG=499241
TEST=none
TBR=andrew

Review URL: https://codereview.webrtc.org/1206653002

Cr-Commit-Position: refs/heads/master@{#9491}
This commit is contained in:
pkasting
2015-06-23 14:38:36 -07:00
committed by Commit bot
parent 39b31001d2
commit 6bfc82aaf1

View File

@ -23,10 +23,8 @@ void WebRtcSpl_CrossCorrelationC(int32_t* cross_correlation,
for (i = 0; i < dim_cross_correlation; i++) {
int32_t corr = 0;
/* Unrolling doesn't seem to improve performance. */
for (j = 0; j < dim_seq; j++) {
// It's not clear why casting |right_shifts| here helps performance.
corr += (seq1[j] * seq2[j]) >> (int16_t)right_shifts;
}
for (j = 0; j < dim_seq; j++)
corr += (seq1[j] * seq2[j]) >> right_shifts;
seq2 += step_seq2;
*cross_correlation++ = corr;
}