Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 201
Add mypy_types benchmark#102
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
Conversation
Fidget-Spinner commented May 26, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Fidget-Spinner commented May 26, 2021
Huh, I forgot that mypy doesn't support pypy due to dependence on CPython AST. I wonder if there's a way to skip installation of mypy and this specific benchmark just for pypy? |
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you try not not add the benchmark to DEFAULT_GROUP if you are running PyPy?
e470569 to 8514a2aCompareFidget-Spinner commented Jun 13, 2021
Yay the tests are finally passing! This should ready for review now. Please take a look when you have the time Victor. |
gvanrossum left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @ericsnowcurrently take note!
Uh oh!
There was an error while loading. Please reload this page.
Fidget-Spinner commented Aug 4, 2021
Recently I remembered mypy uses mypyc for speedups. I'm inclined to pass Though I'm not sure how to pass in that argument just for mypy. Seems like |
gvanrossum commented Oct 5, 2021
I just was reminded of this PR again. Do we still need to do this when we have Eric's more general #109?
Oh, definitely. Benchmarking mypy with mypyc's speedups says more about mypyc than about the Python interpreter used to run it.
Maybe #109 will help there too? It has a separate toml file per benchmark. I believe Eric also has prepared mods for the Pyston benchmarks that makes them runnable with his new infrastructure; I think it would be a shame if the Pyston benchmarks were forked. We should probably talk to the Pyston team about this before proceeding (@kmod, @undingen). |
| # via sympy | ||
| mypy-extensions==0.4.3 | ||
| # via mypy | ||
| mypy==0.812 |
pablogsalOct 6, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably going to pick up the extension if the wheel is available and the pure python if not, which may give different numbers in different versions. Am I mistaken? Maybe I am missing something.
Edit: I saw this is being discussed already on the PR.
Fidget-Spinner commented Oct 6, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Eric's solution is definitely technically superior (I'm a big fan of his work in that PR). This PR still serves a purpose in adding I'm not sure how |
vstinner commented Oct 6, 2021
If you really don't want to measure the C implementation of mypy, the benchmark should have an option to decide which implementations is taken. See for example pyperformance/benchmarks/bm_pickle.py which implements such option and raises an error if it gets the wrong implementation. |
kmod commented Oct 6, 2021
fwiw in Pyston we run the benchmark without mypyc, but get that not 100% by choice because only the prebuilt mypy wheels are built with mypyc and building a fresh wheel yourself (like we need to do) will not use it. |
ericsnowcurrently commented Dec 9, 2021
FYI, I've merged my PR that allows running benchmarks that aren't part of pyperformance. I also have a PR up against the Pyston benchmarks repo to allow them to be run using pyperformance: pyston/python-macrobenchmarks#3. |
Fidget-Spinner commented Dec 10, 2021
@ericsnowcurrently awesome! I'll close this PR then since Pyston has the same. |
Fixes#35. Ported from Pyston.