make timing consistent across exercises

This commit is contained in:
morales-gregorio 2024-08-29 15:25:41 +02:00
parent 55cccc5f4f
commit 47fa8f66c0

View file

@ -19,8 +19,7 @@ print(f"We are executed with OMP_NUM_THREADS={threads} for {n=}")
# Measure the time required for matrix multiplication
start_time = time.time()
y = x @ x # The heavy compute
stop_time = time.time()
elapsed_time = stop_time - start_time
elapsed_time = time.time() - start_time
print(f'Time used for matrix multiplication: {elapsed_time:.2f} s')