We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
static LJ_NOINLINE uint32_t hash_128_above(uint64_t seed, const char* str, uint32_t len) { uint32_t chunk_num, chunk_sz, chunk_sz_log2, i, pos1, pos2; uint64_t h1, h2, v; const char* chunk_ptr; chunk_num = 16; chunk_sz = len / chunk_num; chunk_sz_log2 = log2_floor(chunk_sz); pos1 = get_random_pos_unsafe(chunk_sz_log2, 0); pos2 = get_random_pos_unsafe(chunk_sz_log2, 1); h1 = lj_crc32_u32(0, len ^ seed); h2 = 0; /* loop over 14 chunks, 2 chunks at a time */ for (i = 0, chunk_ptr = str; i < (chunk_num / 2 - 1); chunk_ptr += chunk_sz, i++) { v = *cast_uint64p(chunk_ptr + pos1); h1 = lj_crc32_u64(h1, v); v = *cast_uint64p(chunk_ptr + chunk_sz + pos2); h2 = lj_crc32_u64(h2, v); }
every loop just move one chunk,it's a bug here? the loop only cover half string should we set chunk_ptr += 2*chunk_sz #60
The text was updated successfully, but these errors were encountered:
@zhuizhuhaomeng @agentzh
Sorry, something went wrong.
No branches or pull requests
every loop just move one chunk,it's a bug here? the loop only cover half string
should we set chunk_ptr += 2*chunk_sz
#60
The text was updated successfully, but these errors were encountered: