Revert "Vertexcache ComputeMiniHashRange: Doesn't make sense to hash more data than the step size."

This reverts commit 0bbb61e5d2.
This commit is contained in:
Henrik Rydgard 2017-03-19 12:47:12 +01:00
parent 0bbb61e5d2
commit 032c340f50
3 changed files with 3 additions and 6 deletions

View file

@ -444,10 +444,9 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) {
if (sz > 100) {
size_t step = sz / 4;
size_t len = std::min((int)step, 100);
u32 hash = 0;
for (size_t i = 0; i < sz; i += step) {
hash += DoReliableHash32(p + i, len, 0x3A44B9C4);
hash += DoReliableHash32(p + i, 100, 0x3A44B9C4);
}
return hash;
} else {

View file

@ -428,10 +428,9 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) {
if (sz > 100) {
size_t step = sz / 4;
size_t len = std::min((int)step, 100);
u32 hash = 0;
for (size_t i = 0; i < sz; i += step) {
hash += DoReliableHash32(p + i, len, 0x3A44B9C4);
hash += DoReliableHash32(p + i, 100, 0x3A44B9C4);
}
return hash;
} else {

View file

@ -445,9 +445,8 @@ inline u32 ComputeMiniHashRange(const void *ptr, size_t sz) {
if (sz > 100) {
size_t step = sz / 4;
u32 hash = 0;
size_t len = std::min((int)step, 100);
for (size_t i = 0; i < sz; i += step) {
hash += DoReliableHash32(p + i, len, 0x3A44B9C4);
hash += DoReliableHash32(p + i, 100, 0x3A44B9C4);
}
return hash;
} else {