MatthewPeterKelly/poker-stats

Add support for multi-threading

Open

#7 opened on Jun 25, 2023

View on GitHub
 (11 comments) (0 reactions) (0 assignees)Rust (1 fork)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (3 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Overview

Monte-Carlo simulation is perfectly suited for parallel processing: it needs to run the same block of code a huge number of times. It looks like Rayon would be a great choice for implementing this feature.

Implementation Notes

I think that most of the library utilities should be good to go for threading, we just need find an efficient way to aggregate the scores. My initial thought would be to have one AggregateScore object per thread, and then periodically merge those back into a shared (Arc) AggregateScore that synchronizes the data across threads.

Contributor guide