'Numpy significantly slower on Windows than on Ubuntu
I ran the following snippet in IPython on both Windows 10 and Ubuntu 16.04 installed on the same machine (dual-boot):
import numpy as np
a = np.random.random((1280, 1024))
b = np.random.random((1280, 1024))
%timeit a / b
On Windows, this outputs:
1.81 ms ± 21.3 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
On Ubuntu, the output is:
649 µs ± 1.41 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)
I see the same performance difference with all basic arithmetic operations.
On both systems, I'm running this in a conda environment, with Python 3.8.3, NumPy 1.19.2 and MKL 2020.1. The machine runs AMD Ryzen 9 5950X CPU.
Why is there such a big discrepancy between the two systems? Are there ways to bring performance on Windows closer to Ubuntu?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
