chunker: add a comment about a potential speedup

This commit is contained in:
Thomas Waldmann 2016-05-22 01:22:52 +02:00
parent 8834f6fdbd
commit 96a798debb
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ buzhash(const unsigned char *data, size_t len, const uint32_t *h)
static uint32_t
buzhash_update(uint32_t sum, unsigned char remove, unsigned char add, size_t len, const uint32_t *h)
{
uint32_t lenmod = len & 0x1f;
uint32_t lenmod = len & 0x1f; /* Note: replace by constant to get small speedup */
return BARREL_SHIFT(sum, 1) ^ BARREL_SHIFT(h[remove], lenmod) ^ h[add];
}