'How to reduce execution time of exe file

I created an exe file with pyinstaller for my python script, and it performs 10 times slower, than python scrip. I tried onedir and onefile options, but still the performance is too slow. I need to run the script max in one second, and now it is 10 seconds (on windows). Do you know how to reduce the execution time?

Thanks in advance!



Sources

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

Source: Stack Overflow

Solution Source