Обновить lec1/simple_run.py

This commit is contained in:
2026-10-17 08:45:04 +02:00
parent 4e975729fc
commit 7c2ef43090
-1
View File
@@ -8,7 +8,6 @@ if __name__ == "__main__":
n = N_PER_WORKER * p # задача растёт вместе с числом процессов n = N_PER_WORKER * p # задача растёт вместе с числом процессов
with ProcessPoolExecutor(max_workers=p) as pool: with ProcessPoolExecutor(max_workers=p) as pool:
tp, _, _ = bench(estimate_pi_parallel, n, pool, p) tp, _, _ = bench(estimate_pi_parallel, n, pool, p)
9
if p == 1: if p == 1:
t_base = tp t_base = tp
print(f"{p:2d} {n:10_d} {tp:7.2f} {t_base / tp:6.2f}") print(f"{p:2d} {n:10_d} {tp:7.2f} {t_base / tp:6.2f}")