allocator optimizations
This commit is contained in:
@@ -58,7 +58,6 @@ struct FutureMoves {
|
||||
max_depth: usize,
|
||||
/// Color w.r.t
|
||||
agent_color: Piece,
|
||||
gc: usize,
|
||||
}
|
||||
|
||||
impl FutureMoves {
|
||||
@@ -69,7 +68,6 @@ impl FutureMoves {
|
||||
current_depth: 0,
|
||||
max_depth,
|
||||
agent_color,
|
||||
gc: 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,10 +203,7 @@ impl FutureMoves {
|
||||
if let Some(root) = new_root {
|
||||
self.current_root = Some(root);
|
||||
self.current_depth = self.max_depth - self.depth_of(Some(root));
|
||||
self.gc += 1;
|
||||
if self.gc > 3 {
|
||||
self.prune_unrelated();
|
||||
}
|
||||
self.prune_unrelated();
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user