Use android reinterpret hash for float as it is faster.

Test: statsd test
Change-Id: I593edac1d7dcd0c5e84195602b42b7c6c3072a38
This commit is contained in:
Yangster-mac
2018-02-23 11:11:36 -08:00
parent 5d10883825
commit 16b7ff735e

View File

@@ -44,8 +44,8 @@ android::hash_t hashDimension(const HashableDimensionKey& value) {
fieldValue.mValue.str_value)));
break;
case FLOAT: {
float floatVal = fieldValue.mValue.float_value;
hash = android::JenkinsHashMixBytes(hash, (uint8_t*)&floatVal, sizeof(float));
hash = android::JenkinsHashMix(hash,
android::hash_type(fieldValue.mValue.float_value));
break;
}
}