Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[depth_dbm_freecell_solver] Implement extracted items batches of a user-specified size #7

Closed
shlomif opened this issue Dec 6, 2016 · 1 comment

Comments

@shlomif
Copy link
Owner

shlomif commented Dec 6, 2016

This is an attempt to improve the depth_dbm_fc_solver's multi-threading scalability which is currently very poor. In an attempt to reduce the amount of locking and increase CPU utilisation per thread, we want to:

  1. Define a --batch-size argument which can specify an arbitrarily large count of elements that each thread will extract from the queue at a time.

  2. In each thread, extract these items, and without locking: decode them, calculate their derived positions (segregated in an array per irreversible-move-depth). Then, lock the states collections and insert them all into the central depth collections. Repeat.

This is instead of extracting one item from the queue at a time.

Most of this should be done in https://github.com/shlomif/fc-solve/blob/master/fc-solve/source/depth_dbm_solver.c for now. Please use a new feature git branch.

shlomif added a commit that referenced this issue Dec 6, 2016
shlomif added a commit that referenced this issue Dec 6, 2016
Implement #7 and in the
process avoid excessive locking and unlocking for each added item. TODO:
test.
@shlomif
Copy link
Owner Author

shlomif commented Dec 7, 2016

Implemented in commit a8bdd2b with some additional cleanups. Closing

@shlomif shlomif closed this as completed Dec 7, 2016
shlomif added a commit that referenced this issue Dec 25, 2016
shlomif added a commit that referenced this issue Jan 27, 2018
shlomif added a commit that referenced this issue May 21, 2020
shlomif added a commit that referenced this issue May 23, 2020
shlomif added a commit that referenced this issue Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant