rehash MS does too little work before checking the time
Former-commit-id: 3e57b5c961f7dd91ddb24331eba9a3fa39b08fdd
This commit is contained in:
parent
5012176262
commit
6cb89c9aee
@ -242,8 +242,8 @@ int dictRehashMilliseconds(dict *d, int ms) {
|
|||||||
long long start = timeInMilliseconds();
|
long long start = timeInMilliseconds();
|
||||||
int rehashes = 0;
|
int rehashes = 0;
|
||||||
|
|
||||||
while(dictRehash(d,100)) {
|
while(dictRehash(d,1000)) {
|
||||||
rehashes += 100;
|
rehashes += 1000;
|
||||||
if (timeInMilliseconds()-start > ms) break;
|
if (timeInMilliseconds()-start > ms) break;
|
||||||
}
|
}
|
||||||
return rehashes;
|
return rehashes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user