[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-19 Thread Austin Lamb
Austin Lamb added the comment: Thanks Steve! -- ___ Python tracker <https://bugs.python.org/issue42825> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-19 Thread Austin Lamb
Austin Lamb added the comment: What are the next steps for this - anything else I can provide, or is someone able to take a look at the Pull Request? Thanks! -- ___ Python tracker <https://bugs.python.org/issue42

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-04 Thread Austin Lamb
Austin Lamb added the comment: You're right to think that folding is a problem Steve, but thankfully my PR does not enable COMDAT folding for that very reason :). /OPT:ICF enables identical COMDAT folding, but surprisingly-to-me /OPT:REF seems to still enable a small amount of foldi

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-02-01 Thread Austin Lamb
Austin Lamb added the comment: Ping - can anyone suggest either how ctypes does its exporting, or suggest tests I could run to confirm if this change affects python code? The entire test suite in the repo passes. -- ___ Python tracker <ht

[issue42825] Build libraries with "/OPT:REF" linker optimization on Windows

2021-01-26 Thread Austin Lamb
Austin Lamb added the comment: I don't know much about how ctypes exposes stuff - are these exposed as DLL exports? Or if not, how do they get exposed? The linker will remove things it can't find a callsite for, but it leaves in exported functions as of course those are by

[issue42825] Optimization opportunity on Windows

2021-01-04 Thread Austin Lamb
Change by Austin Lamb : -- keywords: +patch pull_requests: +22928 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24098 ___ Python tracker <https://bugs.python.org/issu

[issue42825] Optimization opportunity on Windows

2021-01-04 Thread Austin Lamb
New submission from Austin Lamb : I noticed that CPython and the various libraries built out of the repo aren't using the "/OPT:REF" linker optimization on Windows. This optimization allows the linker to throw away dead/unreachable code, resulting in a substantial decrease