-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make parallel case fully deterministic
The parallel trial code was potentially non-deterministic in it's execution because the way the parallel trials were compared was dependent on execution speed of the pass. This could result in a different output if results with equal number of swaps finished executing in differing amounts of time between runs. This commit addresses this by first collecting the results into an ordered Vec first which is then iterated over serially to find the minimum swap count. This will make the output independent of execution speed of the individual trials.
- Loading branch information
Showing
1 changed file
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters