gh-130701: create new PGO task based on benchmarks #130702
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in the issue, using the unit tests as the PGO task has some problems. This PR creates a new PGO task by taking benchmarks from the "pyperformance" suite and adjusting them (slightly) to work better as a PGO task. I had a couple objectives when moving the benchmark code over:
There are some potential issues in adding this new PGO task:
Lib/test/pgo_taskfolder. We could put the code in a separate repo or PyPI package but I think we prefer that Python can be compiled without additional external dependencies.pyperformanceandLib/test/pgo_taskis not ideal. OTOH, thepyperformancebenchmarks don't see a lot of code changes (in order for benchmark results to be stable) and so keeping the code up-to-date should not be too much of a problem.pgo_taskfolder to cover those code paths.pyperformanceand thepgo_tasksso those execution patterns are better represented. We are focusing a lot of optimization efforts based on whatpyperformanceresults say and so those benchmarks should also be a good representation of real-world programs. If not, we should improve them.Benchmark results from pyperformance.