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 generators benchmark #206

Merged
merged 3 commits into from
May 24, 2022
Merged

Add generators benchmark #206

merged 3 commits into from
May 24, 2022

Conversation

kumaraditya303
Copy link
Contributor

No description provided.

@kumaraditya303 kumaraditya303 marked this pull request as ready for review May 22, 2022 16:18
@kumaraditya303 kumaraditya303 requested a review from gvanrossum May 22, 2022 16:20
@kumaraditya303 kumaraditya303 changed the title Add generators benchmarks Add generators benchmark May 22, 2022
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

The code is fine, but it looks more like a microbenchmark. Have you compared 3.10 and 3.11 yet with this?

@ericsnowcurrently Do you think this makes a reasonable addition? I'm not sure where we stand on adding more microbenchmarks.

@kumaraditya303 The new files are missing trailing newlines.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

One minor suggestion.

@gvanrossum
Copy link
Member

@kumaraditya303 We discussed adding microbenchmarks and the conclusion is that it's okay. So can you address the minor nits? Also, I am concerned about the greenlet-related failure in the 3.11-dev test. I am curious though -- how old is the 3.11-dev version on Ubuntu? Maybe it's an older alpha?

@kumaraditya303
Copy link
Contributor Author

3.11 is failing because of compilation error when compiling greenlet. See the tracking issue python/cpython#92898, it is fixed in main branch and 3.11 but no release has that fix yet.

@kumaraditya303
Copy link
Contributor Author

kumaraditya303 commented May 24, 2022

We discussed adding microbenchmarks and the conclusion is that it's okay.

One thing microbenchmarks are very good at is finding regressions as it is focused on one thing only.

@kumaraditya303 kumaraditya303 requested a review from gvanrossum May 24, 2022 05:34
@gvanrossum gvanrossum merged commit 0435817 into python:main May 24, 2022
@gvanrossum
Copy link
Member

Thanks for the benchmark, and thanks for the link to the issue with greenlet!

@kumaraditya303 kumaraditya303 deleted the generators branch May 25, 2022 10:43
@kumaraditya303
Copy link
Contributor Author

@gvanrossum Benchmark results comparing 3.10 release and 3.12 main branch:

Benchmark 3.10 3.12
generators 299 ms 206 ms: 1.46x faster

@gvanrossum
Copy link
Member

Nice!

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