diff options
Diffstat (limited to 'sem4/hpp/m10/opg1.py')
-rw-r--r-- | sem4/hpp/m10/opg1.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sem4/hpp/m10/opg1.py b/sem4/hpp/m10/opg1.py new file mode 100644 index 0000000..b8de12a --- /dev/null +++ b/sem4/hpp/m10/opg1.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python3 +# Measure the performance of your Python matrix multiplication +import numpy as np +import time + +size=1000 + +a = np.random.random((size, size)) +b = np.random.random((size, size)) + +start = time.time() +result = a @ b +end = time.time() + + +print(result) +print(f"Took { end - start } seconds") |