On Tue, Jul 11, 2017 at 4:01 AM, Armin Rigo <armin.r...@gmail.com> wrote:
> Hi Rocky, > > On 11 July 2017 at 06:28, Rocky Bernstein <r...@dustyfeet.com> wrote: > > Yes, that's true, but I believe that such decisions should offered to the > > programmers rather than dictated. > > If the choice for the programmer is between "run my program exactly > like I expect" and "run my program with some unexpected subtle effects > and no noticeable performance gain", I think the choice need not be > offered. > Sure but that's a straw argument and has a lot of packed opinions in it. Things like "run my program exactly like I expect" is loaded with opinions. As has already been noted, Python removes "if 0:" by default. When I first saw that, I thought it was cool, but honestly it wasn't "exactly as I expect" because I wanted my decompiler to recreate the source code as written which helps me in testing and lo and behold I was getting something different :-) You know what? I got use to it. I had to change my opinion of what "exactly as I expect" meant slightly. And if it *were *the case that everyone felt that no choice needed to be offered, assuming everyone agreed on what "some subtle effects" and "no noticeable performance gain" meant, then gcc and clang wouldn't offer -O2 and -O3 optimization levels. Maybe not even -O or compile everything -O=-1. As I said before, there's a different discussion to be had regarding debugging optimized code, and I have thoughts on that too. And it's basically that if you have a decompiler and/or logs of how the program has been transformed that might be acceptable those who *choose* to use optimization. I suspect a large number of people who write code, have tests as well. And those tests allow one some confidence in that the optimization performed is correct for the optimizer as well as the programmer using the optimizer. In sum, for me, it is more about transparency in how the program has been worked on. If I can see that, I'm cool. Others may feel differently, but that's okay. Optimization is optional. > > > A bientôt, > > Armin. >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev