3 ms·
I wonder if Python could similarly have opt-in optimization (‘-Osomething’) for those who are sure it won't break anything. Though I guess the standard lib migh
by aasasd 8y ago
I wonder if Python could similarly have opt-in optimization (‘-Osomething’) for those who are sure it won't break anything. Though I guess the standard lib might get in the way immediately.
- masklinn 8y agoCPython already has -O and -OO, they just don't do much that's useful (and are mostly detrimental): -O will skip asserts and set __debug__ to False, -OO will also remove docstrings. CPython's compilation pipeline just has a fairly straightforward peephole optimiser: https://github.com/python/cpython/blob/master/Python/peephole.c https://github.com/python/cpython/blob/master/Python/peephol...
- greglindahl 8y agoYou're describing opt-in pessmisation, not opt-in optimization.