Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a benchmark based on python -m pprint #222

Merged
merged 9 commits into from
Jul 7, 2022
Merged

Add a benchmark based on python -m pprint #222

merged 9 commits into from
Jul 7, 2022

Conversation

arhadthedev
Copy link
Member

  1. The moved code measures performance so it should belong here.
  2. The relocation lifts off a question whether python -m pprint should have tests or not.

After merging, python/cpython#92546 needs to be closed.

@arhadthedev
Copy link
Member Author

This creative PR is a receiving half of python/cpython#94613.

@ericsnowcurrently ericsnowcurrently changed the title Move a benchmark from python -m pprint Add a benchmark based on python -m pprint Jul 7, 2022
Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this, Oleg! I've left some comments for you to consider.

@arhadthedev
Copy link
Member Author

@ericsnowcurrently Thank you for your thorough feedback, I've addressed everything.

In addition, I've also moved a class docstring into a file comment, and reworded it together with authorship. I hope I've made it right.

Also I've added hasattr-based conditional running of _safe_repr to not fail CI for pre-3.10 CPython.

What did you have in mind relative to stdlib benchmarks? Note that we already have a bunch of micro-benchmarks for various parts of the stdlib, in distinct benchmarks.

Initially I've thought that a benchmark should be big, like Lib/test/*.py test files.

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates.

@ericsnowcurrently ericsnowcurrently merged commit 684eafe into python:main Jul 7, 2022
@arhadthedev arhadthedev deleted the pprint branch July 8, 2022 03:12
miss-islington pushed a commit to python/cpython that referenced this pull request Jul 25, 2022
This PR couples with python/pyperformance#222 and supersedes #92560. Inspired by #93096 (comment).

Automerge-Triggered-By: GH:ericsnowcurrently
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants