On Fri, Oct 23, 2015 at 3:23 AM, Victor Stinner
wrote:
> Note: I propose "noopt" because we already have "optimization level 0"
> which still uses optimizations, it's the default mode. It's different
> than gcc -O0 which really disables all optimizations. I already
On 10/23/2015 4:23 AM, Victor Stinner wrote:
Hi,
2015-10-22 19:02 GMT+02:00 Brett Cannon :
It's not specified anywhere; it's just what the peepholer decides to remove.
The exact code can be found at
https://hg.python.org/cpython/file/default/Python/peephole.c . There has
been
2015-10-24 4:34 GMT+09:00 Terry Reedy :
> How about -x nopeep to specifically skip the peephole optimizer?
Raymond wrote "IIRC, the code was never generated in the first place
(before the peephole pass)."
So "nopeep" would have a different purpose.
Victor
On 10/26/2015 10:36 PM, Victor Stinner wrote:
2015-10-24 4:34 GMT+09:00 Terry Reedy :
How about -x nopeep to specifically skip the peephole optimizer?
Raymond wrote "IIRC, the code was never generated in the first place
(before the peephole pass)."
I based that suggestion
> On Oct 25, 2015, at 12:33 PM, Raymond Hettinger
> wrote:
>
>> On Oct 22, 2015, at 10:02 AM, Brett Cannon wrote:
>>
>> So my question is, the byte code generator removes the unused functions,
>> variables etc…, is it right?
>>
>> Technically
> On Oct 22, 2015, at 10:02 AM, Brett Cannon wrote:
>
> So my question is, the byte code generator removes the unused functions,
> variables etc…, is it right?
>
> Technically the peepholer removes the dead branch, but since the peepholer is
> run on all bytecode you can't
Thank you for your confirmation,
I am going to read the devguide.
> On 25 oct. 2015, at 7:50 PM, Raymond Hettinger
> wrote:
>
>
>>> On Oct 25, 2015, at 12:33 PM, Raymond Hettinger
>>> wrote:
>>>
>>> On Oct 22, 2015, at 10:02 AM,
Hi,
2015-10-22 19:02 GMT+02:00 Brett Cannon :
> It's not specified anywhere; it's just what the peepholer decides to remove.
> The exact code can be found at
> https://hg.python.org/cpython/file/default/Python/peephole.c . There has
> been talk in the past for adding a -X flag
On Thu, 22 Oct 2015 17:02:48 -, Brett Cannon wrote:
> On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote:
>
> > Hi all,
> >
> > When we compile a python script
> >
> > # test.py
> > if 0:
> > x = 1
> >
> > python -mdis test.py
> >
> > There is
On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote:
> Hi all,
>
> When we compile a python script
>
> # test.py
> if 0:
> x = 1
>
> python -mdis test.py
>
> There is no byte code for the condition.
>
> So my question is, the byte code generator removes the unused
On Fri, Oct 23, 2015 at 3:05 PM, Terry Reedy wrote:
> Indeed, whether 'pass' should be compiled to 'NOP' or nothing depends on
> one's view of the meaning of pass and whether it must be executed (by going
> though the ceval loop once and doing nothing) or not.
Hmm. I thought
On 10/22/2015 1:56 PM, R. David Murray wrote:
On Thu, 22 Oct 2015 17:02:48 -, Brett Cannon wrote:
On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote:
Hi all,
When we compile a python script
# test.py
if 0:
x = 1
python -mdis test.py
Hi all,
When we compile a python script
# test.py
if 0:
x = 1
python -mdis test.py
There is no byte code for the condition.
So my question is, the byte code generator removes the unused functions,
variables etc…, is it right?
What are the cases where the generator does not generate
Thank you Brett,
I am going to read the source code, I am going to give a presentation at
PyCon.IE about this part and I wanted to be sure about the dead branches.
Thanks
On 22 Oct 2015, at 19:02, Brett Cannon wrote:
> On Thu, 22 Oct 2015 at 09:37 Stéphane Wirtel wrote:
>
14 matches
Mail list logo