'Why is the Python interpreter from my Anaconda environment faster than from VS2017?

I have two Python environments: one from Visual Studio 2017 and one from Anaconda.

I found that the first one is twice as slow as the second, even if I run *.py scripts not via Visual Studio shell, but directly from command line using python.exe:

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe  example.py

takes 10.1 seconds, and

C:\ProgramData\Anaconda3\python.exe  example.py

takes 5.1 seconds.

What could be the reason of such behavior?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source