I installed pyinstaller in the hopes that i could improve my python codes performance by transforming all my python scripts into binary. To test this, i made a simple script named test_compiler.py:
#!/usr/bin/python3
import time
start_time = time.time()
c = 0
while c<10000000:
c=c+1
print(time.time()-start_time)
Executing this script usually printed a float between 0.49 and 0.55. Then in the folder in which i had this script i did:
pyinstaller test_compiler.py
which generated a few files and folders. I did
cd ./dist/test_compiler/
./test_compiler
And doing this always prints a float between 0.6 and 0.65. I know this question probably sounds naive to someone with more knowledge in the matter, but shouldnt turning my code into binary improve its performance? Did i completely misinterpret pyinstaller's objectives thinking they involved performance but its actually more like privacy and deployment?
More important: is there any similar approach that could help me with performance?