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

Support parallel operations over pages #36

Merged
merged 10 commits into from
Dec 30, 2024
Prev Previous commit
Next Next commit
fix: do not submit a gratuitous extra job
dhdaines committed Dec 30, 2024
commit 3408671419cae10d1fa05675e3eb103f5060dde7
2 changes: 1 addition & 1 deletion benchmarks/parallel_miner.py
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ def benchmark_multi(path: Path, ncpu: int):
batches = []

with ProcessPoolExecutor(max_workers=ncpu) as pool:
step = max(1, npages // ncpu)
step = max(1, round(npages / ncpu))
for start in range(0, npages, step):
end = min(npages, start + step)
batch = list(range(start, end))