#16457: Rename xrange() to range()
-------------------------------------+-------------------------------------
Reporter: aapitzsch | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.3
Component: misc | Resolution:
Keywords: python3 | Merged in:
Authors: André Apitzsch | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/aapitzsch/ticket/16457 | d3bae80fba004f3a633c3e0759293a61854f0208
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
I am strongly against that this ticket is being merge now. We are far from
having the Python 3 switch tomorrow (is it even a blocker for sage-6.3?).
It will slow down everything. `xrange` is faster by 40% on lists of size
100:
{{{
sage: timeit("for i in xrange(100):\n for j in xrange(100): pass")
625 loops, best of 3: 362 µs per loop
sage: timeit("for i in range(100):\n for j in range(100): pass")
625 loops, best of 3: 501 µs per loop
}}}
And there are many of them in Sage source code.
--
Ticket URL: <http://trac.sagemath.org/ticket/16457#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.