mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-14 04:19:22 +03:00
improves u3r_mug_bytes() efficiency (a little)
This commit is contained in:
parent
15b0268c6f
commit
72d2b09f83
@ -1495,15 +1495,19 @@ u3r_mug_bytes(const c3_y *buf_y,
|
||||
c3_w syd_w = 0xcafebabe;
|
||||
c3_w ham_w = 0;
|
||||
|
||||
while ( 0 == ham_w ) {
|
||||
while ( 1 ) {
|
||||
c3_w haz_w;
|
||||
MurmurHash3_x86_32(buf_y, len_w, syd_w, &haz_w);
|
||||
ham_w = (haz_w >> 31) ^ (haz_w & 0x7fffffff);
|
||||
|
||||
if ( 0 == ham_w ) {
|
||||
syd_w++;
|
||||
}
|
||||
|
||||
else {
|
||||
return ham_w;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* u3r_mug_chub(): Compute the mug of `num`, LSW first.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user