News for hackers. Stuff that matters.
Re:A function decorator that rewrites the bytecode to enable... by klyrs on Monday September 20, 2021 @09:55PM (#28601253)
This is true, but I suspect that you're getting downvoted because python doesn't do bytecode optimization.
Re:A function decorator that rewrites the bytecode to enable... by nerdponx on Monday September 20, 2021 @11:21PM (#28601774)
CPython doesn't. But the other Python implementations (PyPy, GraalVM, et al) don't even use the CPython bytecode.
Re:A function decorator that rewrites the bytecode to enable... by klyrs on Tuesday September 21, 2021 @12:16PM (#28606578)
Also true... but this decorator isn't going to work in that context.
Re:A function decorator that rewrites the bytecode to enable... by masklinn on Tuesday September 21, 2021 @05:37AM (#28603383)
Cpython absolutely does, just not much of it (it has a peephole optimiser with a very small set of opts).