I have two Python environments (3.6).
I installed packages in one environment via conda, and in another environment via pip.
Then I found that conda-provided numpy and pandas run quicker than pip version (for most of the scenario).
Just wonder why this happens. Is that because they use different configuration during compilation?
Yes, most likely this difference is due to different compilation configurations. Numpy makes use of the low-level fortran libraries BLAS and LAPACK. The numpy that you get from pip is compiled with different implementations of BLAS and LAPACK than the numpy that you get from conda. The latter uses the MKL implementation which is optimized specifically for Intel processors.
You can check the implementation that numpy is using in a particular environment with:
import numpy as np
np.show_config()
Some comparison benchmarks can be found here (as already noted by crisb).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With