FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add benchmark for deepcopy by eendebakpt · Pull Request #201 · python/pyperformance · GitHub

Add benchmark for deepcopy - #201

Merged
ericsnowcurrently merged 6 commits into
python:mainfrom
eendebakpt:deepcopy_benchmark
Jun 7, 2022
Merged

Add benchmark for deepcopy#201
ericsnowcurrently merged 6 commits into
python:mainfrom
eendebakpt:deepcopy_benchmark

Conversation

Copy link
Copy Markdown
Contributor

One python method that is currently not in the pyperformance benchmarks is deepcopy. This PRs adds a benchmark that tests performance of deepcopy on a nested dictionary and a dataclass.

The dictionary and dataclass have been chosen as example of structures can are often copied and then modified. (e.g. passing configuration settings to a method that modifies one of the settings before passing it on)

Fixes #199

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks mostly good. Aside from a few linting issues, there are only a couple small concerns.

Copy link
Copy Markdown
Contributor Author

This looks mostly good. Aside from a few linting issues, there are only a couple small concerns.

@ericsnowcurrently Changes made.

Copy link
Copy Markdown
Member

Thanks, @eendebakpt. I'll take a look as soon as I can.

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Mostly LGTM. There are a few really minor things that I won't even bother mentioning. 😄 The only thing worth looking at is the overhead of everything going on the in the various loops in the one benchmark. My recommendation doesn't impact readability all that much so you might as well apply it, just in case.

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
ericsnowcurrently self-requested a review June 7, 2022 13:43

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

ericsnowcurrently merged commit 259edee into python:main Jun 7, 2022

Copy link
Copy Markdown
Member

Thanks for the benchmark, @eendebakpt!

eendebakpt deleted the deepcopy_benchmark branch June 7, 2022 18:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Benchmark suggestion: deepcopy

2 participants


Back | FazBrowse Home | New Git URL