[Python-Dev] Profile Guided Optimization active by-default

Stefan Behnel stefan_ml at behnel.de
Sat Aug 22 19:25:02 CEST 2015


Guido van Rossum schrieb am 22.08.2015 um 18:55:
> Regarding the training set, I agree that regrtest sounds to be better than
> pybench. If we make this an opt-in change, we can experiment with different
> training sets easily. (Also, I haven't seen the patch yet, but I presume
> it's easy to use a different training set?

It's just one command in one line, yes.


> Experimentation should be encouraged.)

A well chosen training set can have a notable impact on PGO compiled code
in general, and switching from pybench to regrtests should make such a
difference. However, since CPython's overall performance is mostly
determined by the interpreter loop, general object operations (getattr!)
and the basic builtin types, of which the regression test suite makes
plenty of use, it is rather unlikely that other training sets would provide
substantially better performance for Python code execution.

Note also that Ubuntu has shipped PGO builds based on the regrtests for
years, and they seemed to be quite happy with it.

Stefan




More information about the Python-Dev mailing list