GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Optimization of Python ASTs: How should we deal with constant values?

[Python-Dev] Optimization of Python ASTs: How should we deal with constant values?

Jeremy Hylton jeremy at alum.mit.edu
Tue May 6 17:39:21 CEST 2008

  • Previous message: [Python-Dev] Optimization of Python ASTs: How should we deal with constant values?
  • Next message: [Python-Dev] Optimization of Python ASTs: How should we deal with constant values?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Fri, May 2, 2008 at 1:38 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> Thomas Lee wrote:
>  > Martin v. Löwis wrote:
>  >>> This leaves us with a few options:
>  >>>
>  >>
>  >> 5. Reuse/Abuse Num(object) for arbitrary constants.
>  >>    AFAICT, this should work out of the box.
>  >>
>  >>
>  > Eek. It *does* seem like Num would work out of the box, but would this
>  > be a good idea?
>
>  No. I suggested it just for completeness.
>
>
>  > What about *replacing* Num with Const? Might make optimizations
>  > specifically for numeric values slightly hairier, and semantically I
>  > think they might be different enough to warrant separate AST nodes
>  > despite the similarity in implementation at the compiler level.
>
>  I think they should be separate. Const would be a mere addition;
>  for compatibility with other uses of the AST, that's actually better
>  than simultaneous removal of Num.

Adding Const sounds good to me.

Jeremy

>
>  Regards,
>  Martin
>
>
>
>  _______________________________________________
>  Python-Dev mailing list
>  Python-Dev at python.org
>  http://mail.python.org/mailman/listinfo/python-dev
>  Unsubscribe: http://mail.python.org/mailman/options/python-dev/jeremy%40alum.mit.edu
>

  • Previous message: [Python-Dev] Optimization of Python ASTs: How should we deal with constant values?
  • Next message: [Python-Dev] Optimization of Python ASTs: How should we deal with constant values?
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.