... | @@ -199,8 +199,8 @@ How much faster is NumPy? Let us run a quick using [benchmark_broadcasting.py](h |
... | @@ -199,8 +199,8 @@ How much faster is NumPy? Let us run a quick using [benchmark_broadcasting.py](h |
|
print(f"NumPy Time : {np_array:.4f}")
|
|
print(f"NumPy Time : {np_array:.4f}")
|
|
```
|
|
```
|
|
|
|
|
|
On a Core i7-6700k... For 1 million numbers, run 100 times... The NumPy code is almost
|
|
On a Core i7-6700k... For 1 million numbers, run 100 times... The NumPy code is
|
|
10 times faster than the pure Python code.
|
|
a little over 10 times faster than the pure Python code.
|
|
|
|
|
|
| | Time |
|
|
| | Time |
|
|
| :--- | ---: |
|
|
| :--- | ---: |
|
... | | ... | |