Skip to content

[mypyc] Use C optimization level 0 for tests by default #9131

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

Merged
merged 2 commits into from
Jul 11, 2020

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jul 11, 2020

This speeds up run tests significantly, but it might miss some checks
only performed on higher optimization levels.

On my Linux desktop, this speeds up pytest mypyc from about 18s to
about 12s. It should also speed up CI builds, but I haven't measured
the impact.

Let's try this out. We can always revert this back if this turns out
to cause problems.

The environment variable MYPYC_OPT_LEVEL can be used to override
the optimization level. Example:

MYPYC_OPT_LEVEL=3 pytest mypyc

Closes mypyc/mypyc#745.

This speeds up run tests significantly, but it might miss some checks
only performed on higher optimization levels.

On my Linux desktop, this speeds up `pytest mypyc` from about 18s to
about 12s. It should also speed up CI builds, but I haven't measured
the impact.

Let's try this out. We can always revert this back if this turns out
to cause problems.

The environment variable MYPYC_OPT_LEVEL can be used to override
the optimization level. Example:

    MYPYC_OPT_LEVEL=3 pytest mypyc

Closes mypyc/mypyc#745.
@TH3CHARLie
Copy link
Collaborator

Maybe I should finish #9030 quickly... so we can make opt_level a -O{0-3} option

@JukkaL
Copy link
Collaborator Author

JukkaL commented Jul 11, 2020

There's no hurry, since we'll need a different way to pass options to pytest anyway.

@JukkaL JukkaL merged commit e8e44e6 into master Jul 11, 2020
@JelleZijlstra JelleZijlstra deleted the test-c-opt-level branch July 11, 2020 23:54
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.

Use -O0 for run tests?
2 participants