2 ms·
CPython 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 al
by masklinn 8y ago
CPython 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.