The Artima Developer Community
Sponsored Link

Weblogs Forum
Python 3000 Status Update (Long!)

47 replies on 4 pages. Most recent reply: Jun 13, 2008 4:43 PM by Brad Schick

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 47 replies on 4 pages [ « | 1 2 3 4 ]
William Baxter

Posts: 4
Nickname: baxissimo
Registered: Jul, 2007

Re: Python 3000 Status Update (Long!) Posted: Jul 31, 2007 7:09 PM
Reply to this message Reply
Advertisement
On the topic of range becoming xrange:
I think this is a good change in general but it seems like there are some specific cases where you still want a list of numbers and creating it directly via something like the current range() is presumably much more efficient than something like list(xrange()).

Am I mistaken about the efficiency of list(xrange(..)) vs range(..)?

Or will there be a library replacement that does what the current range does?

Guido van van Rossum

Posts: 359
Nickname: guido
Registered: Apr, 2003

Re: Python 3000 Status Update (Long!) Posted: Aug 1, 2007 4:54 PM
Reply to this message Reply
> On the topic of range becoming xrange:
> I think this is a good change in general but it seems like
> there are some specific cases where you still want a list
> of numbers and creating it directly via something like the
> current range() is presumably much more efficient than
> something like list(xrange()).

The difference isn't that great:

$ python -m timeit 'range(100000)'
100 loops, best of 3: 2.5 msec per loop
$ python -m timeit 'list(xrange(100000))'
100 loops, best of 3: 2.9 msec per loop

That was Python 2.4; 2.5 is about the same.

Python 3.0 is *currently* more than 10x slower, but I suspect that's a matter of long integers more than iterators, and the solution is to optimize long integers.

Brad Schick

Posts: 1
Nickname: schickb
Registered: Jun, 2008

Re: Python 3000 Status Update (Long!) Posted: Jun 13, 2008 4:43 PM
Reply to this message Reply
It has been almost a year since this big update. I'd love to see another one if you can find the time. I'm particularly interested in the status of generic functions (PEP 3124).

Flat View: This topic has 47 replies on 4 pages [ « | 1  2  3  4 ]
Topic: Python 3000 Status Update (Long!) Previous Topic   Next Topic Topic: Scala steadily marches towards world domination!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use