benchmark

M8R-n7vorv at mailinator.com M8R-n7vorv at mailinator.com
Mon Aug 11 12:21:53 CEST 2008


On Aug 11, 2:09 pm, cokofree... at gmail.com wrote:
> On Aug 11, 10:55 am, M8R-n7v... at mailinator.com wrote:
>
>
>
> > On Aug 10, 10:10 pm, Kris Kennaway <k... at FreeBSD.org> wrote:
>
> > > jlist wrote:
> > > > I think what makes more sense is to compare the code one most
> > > > typically writes. In my case, I always use range() and never use psyco.
> > > > But I guess for most of my work with Python performance hasn't been
> > > > a issue. I haven't got to write any large systems with Python yet, where
> > > > performance starts to matter.
>
> > > Hopefully when you do you will improve your programming practices to not
> > > make poor choices - there are few excuses for not using xrange ;)
>
> > > Kris
>
> > And can you shed some light on how that relates with one of the zens
> > of python ?
>
> > There should be one-- and preferably only one --obvious way to do it.
>
> > Dhananjay
>
> And that is xrange, but if you need a list range is better :P

Interesting to read from PEP-3000 : "Python 2.6 will support forward
compatibility in the following two ways:

    * It will support a "Py3k warnings mode" which will warn
dynamically (i.e. at runtime) about features that will stop working in
Python 3.0, e.g. assuming that range() returns a list."



More information about the Python-list mailing list