usage of TOP_K_CHILDREN

This commit is contained in:
Simon Gardling 2025-02-18 20:54:07 -05:00
parent be790c2d9e
commit a759f9f615
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 2 additions and 3 deletions

View File

@ -192,8 +192,8 @@ impl FutureMoves {
if parent.lazy_children && !lazy_children { if parent.lazy_children && !lazy_children {
self.arena[parent_idx].lazy_children = false; self.arena[parent_idx].lazy_children = false;
// this move's children are being regenerated after lazy child expiration, don't append first node // this move's children are being regenerated after lazy child expiration, don't append first node
if new.len() > 1 { if new.len() > TOP_K_CHILDREN {
self.arena.extend(new.drain(1..)); self.arena.extend(new.drain(TOP_K_CHILDREN..));
} else { } else {
// nothing will be appended // nothing will be appended
// even though it was sorted the first time around // even though it was sorted the first time around

View File

@ -28,7 +28,6 @@ where
pub fn diag_raw<T>( pub fn diag_raw<T>(
i_chains: [impl Iterator<Item = T> + Clone; 2], i_chains: [impl Iterator<Item = T> + Clone; 2],
j_chains: [impl Iterator<Item = T> + Clone; 2], j_chains: [impl Iterator<Item = T> + Clone; 2],
) -> [impl Iterator<Item = (T, T)> + Clone; 4] ) -> [impl Iterator<Item = (T, T)> + Clone; 4]
where where