make timing consistent across exercises
This commit is contained in:
parent
55cccc5f4f
commit
47fa8f66c0
|
@ -19,8 +19,7 @@ print(f"We are executed with OMP_NUM_THREADS={threads} for {n=}")
|
||||||
# Measure the time required for matrix multiplication
|
# Measure the time required for matrix multiplication
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
y = x @ x # The heavy compute
|
y = x @ x # The heavy compute
|
||||||
stop_time = time.time()
|
elapsed_time = time.time() - start_time
|
||||||
elapsed_time = stop_time - start_time
|
|
||||||
|
|
||||||
print(f'Time used for matrix multiplication: {elapsed_time:.2f} s')
|
print(f'Time used for matrix multiplication: {elapsed_time:.2f} s')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue