-
Notifications
You must be signed in to change notification settings - Fork 73
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
Use /O2 instead of /Ox option for MSVC #30
Comments
Thanks for re-posting. I hope at least here this will finally be fixed... Off-topic:
|
@Kojoley , the poster of CPython issue37794. |
Fixed in #33 |
* Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <[email protected]>
* Use `extend-ignore` in flake8 config This option allows to add extra ignored rules to the default list instead of replacing it. The default exclusions are: E121, E123, E126, E226, E24, E704, W503 and W504. Fixes #28. Refs: * https://github.com/pypa/setuptools/pull/2486/files#r541943356 * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-extend-ignore * https://flake8.pycqa.org/en/latest/user/options.html#cmdoption-flake8-ignore * Enable complexity limit. Fixes jaraco/skeleton#34. * Replace pep517.build with build (#37) * Replace pep517.build with build Resolves #30 * Prefer simple usage Co-authored-by: Jason R. Coombs <[email protected]> * Use license_files instead of license_file in meta (#35) Singular `license_file` is deprecated since wheel v0.32.0. Refs: * https://wheel.readthedocs.io/en/stable/news.html * https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file Co-authored-by: Jason R. Coombs <[email protected]>
In MSVC,
/Ox
optimization is used by default.Compared with
/Ox
,/O2
has these two additional options:/GF
: eliminates duplicate strings/Gy
: does function level linkingA stackoverflow question, it has some doc links:
https://stackoverflow.com/questions/5063334/what-is-the-difference-between-the-ox-and-o2-compiler-options
I tested a CPython module
pyzstd
, adding/GF
reduced the .pyd file size from 642 KB to 641 KB, further adding/Gy
reduced to 466 KB (!). It seems no performance loss.A CPython issue about this:
https://bugs.python.org/issue37794
The text was updated successfully, but these errors were encountered: