
On Tue, Jul 21, 2020 at 11:46 AM Mark Shannon <mark@hotpy.org> wrote:
On 18/07/2020 9:20 am, Inada Naoki wrote:
And I am worrying precise tracing blocks future advanced bytecode optimization. Can we omit precise tracing and line number information when optimization (`-O`) is enabled?
I don't think that is a good idea. Performing any worthwhile performance optimization requires that we can reason about the behavior of programs. Consistent behavior makes that much easier. Inconsistent "micro optimizations" make real optimizations harder.
Echoing what Mark said, there should be no perceived tension between debugging and optimization. For over 20 years the JVM has been the existence proof: Java is always precisely debuggable when the compiler is generating code at the highest optimization levels. IMHO, a Python user shouldn't have to expect anything less.