STINNER Victor added the comment: > $ time for i in `seq 100`; do ./python -S -c 'import argparse; > argparse.ArgumentParser()'; done
Measuring Python startup performance is painful, there is a huge deviation. You may try the new "command" command that I added to perf 1.1: ----------------------- haypo@selma$ python3 -m perf command --stats -- python3 -S -c pass ..................... Total duration: 21.0 sec Start date: 2017-04-28 12:15:57 End date: 2017-04-28 12:16:20 Raw value minimum: 174 ms Raw value maximum: 229 ms Number of calibration run: 1 Number of run with values: 20 Total number of run: 21 Number of warmup per run: 1 Number of value per run: 3 Loop iterations per value: 16 Total number of values: 60 Minimum: 10.9 ms Median +- MAD: 12.3 ms +- 0.5 ms Mean +- std dev: 12.4 ms +- 0.7 ms Maximum: 14.3 ms 0th percentile: 10.9 ms (-12% of the mean) -- minimum 5th percentile: 11.2 ms (-10% of the mean) 25th percentile: 11.9 ms (-4% of the mean) -- Q1 50th percentile: 12.3 ms (-1% of the mean) -- median 75th percentile: 12.9 ms (+4% of the mean) -- Q3 95th percentile: 13.7 ms (+10% of the mean) 100th percentile: 14.3 ms (+15% of the mean) -- maximum Number of outlier (out of 10.4 ms..14.4 ms): 0 command: Mean +- std dev: 12.4 ms +- 0.7 ms ----------------------- There is a huge difference between the minimum and the maximum. By the way, I'm interested by feedback on that tool, I'm not sure that it's reliable, it can likely be enhanced somewhere ;-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30152> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com