Splitting the workload #10
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be nice to be able to split work across multiple machines. Something like:
./sudoku-funpark -workload 2 -part 1 ...etc...
./sudoku-funpark -workload 2 -part 2 ...etc...
Goal is to specify how many parts there are, and which part the tool should take.
The hard part is figuring out how to evenly split the workload amongst x amount of machines. If the first row is completely filled, or has only one spot, and need to split the workload in two, it gets iffy. Same goes for first row being filled, and then working with 3 places in the second row.
I need to write an algorithm for that.
First iteration would be just dealing with the first row.
🤔 Maybe give it a thonk.
https://go.dev/play/p/GqX8a_vdkNd
Did a proof of concept. I think I am better off creating an array with the size of
split
, and iterate through them, +1 each one till the diff is0
.This worked like a charm.
Done with
74f1fb63e1
This was a fun one.