Browse article archive

Does a PyInstaller EXE run faster?

English summary

Read the full post in Chinese

On a ThinkPad T495 with a Ryzen 5 PRO 3500U, the PyInstaller EXE averaged 3.58% less time for a million empty loop iterations and 4.14% less time for the NumPy test. Each result averages five runs of the same Python 3.11 code.

The NumPy test times the creation of two 1,000 × 1,000 random matrices, their multiplication, the inverse, and a sum. Both timers start inside the test functions, so the results compare the work after startup, not the time from launching the program to its first output.

See the test code and output