Performance issues of Numpy under WSL2

I found the problem: I had not installed Intel's MKL libraries for accelerating low-level linear algebra operations (BLAS and LAPACK). They come pre-configured in Anaconda installations, which is what I used on Windows. To solve this, either install Anaconda on WSL2 (so it becomes your default Python environment) or install Intel MKL's libraries with the command below (and let them replace the BLAS and LAPACK libraries when asked during installation):

sudo apt install libmkl-dev

The performance drop in WSL2 for Numpy is now around 10% (or less in some cases), which is acceptable for me.