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 committed 2017-03-19 12:47:12 +01:00
1 parent 0bbb61e5d2
commit 032c340f50
3 files changed
+3 -6

No files matched your search

+1 -2
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 {
+1 -2
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 {
+1 -2
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 {