ooh at 99% cap
This commit is contained in:
@@ -410,7 +410,8 @@ where
|
||||
let mut state_moves = std::collections::HashMap::with_capacity(HUGE_CAP);
|
||||
let mut state = self.clone();
|
||||
while !state.is_win() {
|
||||
if HUGE_CAP <= state_moves.len() {
|
||||
// don't look for empty hash map buckets when the hash map is 99% full!
|
||||
if HUGE_CAP * 127 <= state_moves.len() * 128 {
|
||||
return Err(Oom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user