Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
JukkaL merged 2 commits into
masterfrom
test-c-opt-level
Jul 11, 2020
Merged

[mypyc] Use C optimization level 0 for tests by default#9131
JukkaL merged 2 commits into
masterfrom
test-c-opt-level

Conversation

@JukkaL

@JukkaL JukkaL commented Jul 11, 2020

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

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

@JukkaL

JukkaL commented Jul 11, 2020

Copy link
Copy Markdown
Collaborator Author

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