14 lines
322 B
Python
14 lines
322 B
Python
import numpy as np
|
|
import time
|
|
|
|
if __name__ == '__main__':
|
|
start = time.perf_counter()
|
|
a, b = np.random.rand(1024, 1024), np.random.rand(1024, 1024)
|
|
print(f'init time: {time.perf_counter() - start}')
|
|
|
|
start = time.perf_counter()
|
|
|
|
c = np.dot(a, b)
|
|
|
|
print(f'dot time: {time.perf_counter() - start}')
|