Use memcmp for mju_compare if no AVX. 15% faster on Humanoid.
PiperOrigin-RevId: 493324356 Change-Id: I5f71dc1a8ae40c18864ea80f00a5f86ff952f72c
This commit is contained in:
committed by
Copybara-Service
parent
7f459ab8ca
commit
2d304d65e5
@@ -397,13 +397,7 @@ static int mju_compare(const int* vec1, const int* vec2, int n) {
|
||||
#endif
|
||||
|
||||
// scalar part
|
||||
for (; i<n; i++) {
|
||||
if (vec1[i]!=vec2[i]) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return !memcmp(vec1+i, vec2+i, (n-i)*sizeof(int));
|
||||
}
|
||||
|
||||
// combine two sparse vectors: dst = a*dst + b*src, return nnz of result
|
||||
|
||||
Reference in New Issue
Block a user