Hi, I always wanted to be able to compare the performance of two Python versions using timeit *in a single command*. So I just implemented it! I added --python and --compare-to options.
Real example to show the new "timeit --compared-to" feature: --- $ export PYTHONPATH=~/prog/GIT/perf $ ./python-resize -m perf timeit --inherit-environ=PYTHONPATH --compare-to=./python-ref -s 'x = range(1000); d={}' 'for i in x: d[i]=i; del d[i];' --rigorous python-ref: ........................................ 77.6 us +- 1.8 us python-resize: ........................................ 74.8 us +- 1.9 us Median +- std dev: [python-ref] 77.6 us +- 1.8 us -> [python-resize] 74.8 us +- 1.9 us: 1.04x faster --- http://bugs.python.org/issue28199#msg277755 Changes between 0.7.11 and 0.7.12: * Add ``--python`` command line option * ``timeit``: add ``--name``, ``--inner-loops`` and ``--compare-to`` options * TextRunner don't set CPU affinity of the main process, only on worker processes. It may help a little bit when using NOHZ_FULL. * metadata: add ``boot_time`` and ``uptime`` on Linux * metadata: add idle driver to ``cpu_config`` Victor _______________________________________________ Speed mailing list Speed@python.org https://mail.python.org/mailman/listinfo/speed