Skip to content

Commit 0fb880c

Browse files
committed
parallelized equity calc
1 parent fb03ef5 commit 0fb880c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/clustering/lookup.rs

+3
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ impl Save for Lookup {
5151
std::fs::metadata(format!("{}{}", street, Self::name())).is_ok()
5252
}
5353
fn make(street: Street) -> Self {
54+
use rayon::iter::IntoParallelIterator;
5455
// abstractions for River are calculated once via obs.equity
5556
// abstractions for Preflop are cequivalent to just enumerating isomorphisms
5657
match street {
5758
Street::Rive => IsomorphismIterator::from(Street::Rive)
59+
.collect::<Vec<_>>()
60+
.into_par_iter()
5861
.map(|iso| (iso, Abstraction::from(iso.0.equity())))
5962
.collect::<BTreeMap<_, _>>()
6063
.into(),

0 commit comments

Comments
 (0)