Mark Dickinson <dicki...@gmail.com> added the comment:

Here's an updated patch, against py3k.  On my machine, a/b is a touch faster 
with this patch when abs(a), 
abs(b) are smaller than 1e15 or so;  it's (inevitably) slower than the existing 
implementation for larger a 
and b.  For 'random' a and b, average running time is proportional to the size 
of b, and is independent of 
the size of a;  worst-case running time (which occurs when a has many trailing 
zero bits) grows as 
max(size(a), size(b)).

Changing versions to 2.7 and 3.2, but I'm mostly aiming for 3.2.  It may not be 
worth backporting to 2.7, 
given the extra effort required to deal correctly with ints as well as with 
longs.

----------
stage:  -> patch review
versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0
Added file: http://bugs.python.org/file15667/long_division2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1811>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to