cpython/Objects
Tim Peters 44121a6bc9 x_mul(): This failed to normalize its result.
k_mul():  This didn't allocate enough result space when one input had
more than twice as many bits as the other.  This was partly hidden by
that x_mul() didn't normalize its result.

The Karatsuba recurrence is pretty much hosed if the inputs aren't
roughly the same size.  If one has at least twice as many bits as the
other, we get a degenerate case where the "high half" of the smaller
input is 0.  Added a special case for that, for speed, but despite that
it helped, this can still be much slower than the "grade school" method.
It seems to take a really wild imbalance to trigger that; e.g., a
2**22-bit input times a 1000-bit input on my box runs about twice as slow
under k_mul than under x_mul.  This still needs to be addressed.

I'm also not sure that allocating a->ob_size + b->ob_size digits is
enough, given that this is computing k = (ah+al)*(bh+bl) instead of
k = (ah-al)*(bl-bh); i.e., it's certainly enough for the final result,
but it's vaguely possible that adding in the "artificially" large k may
overflow that temporarily.  If so, an assert will trigger in the debug
build, but we'll probably compute the right result anyway(!).
2002-08-12 06:17:58 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c Patch #554716: Use __va_copy where available. 2002-07-28 10:23:27 +00:00
boolobject.c Make more functions static 2002-08-06 22:12:52 +00:00
bufferobject.c Fix SF bug 546434 -- buffer slice type inconsistent. 2002-06-25 00:25:30 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c object.h special-build macro minefield: renamed all the new lexical 2002-07-11 06:23:50 +00:00
cobject.c Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
complexobject.c Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
descrobject.c SF patch 568629 by Oren Tirosh: types made callable. 2002-06-14 20:41:17 +00:00
dictobject.c staticforward bites the dust. 2002-07-17 16:30:39 +00:00
enumobject.c Remove the next() method -- one is supplied automatically by 2002-07-16 21:02:42 +00:00
fileobject.c Make readahead functions static 2002-08-06 21:50:54 +00:00
floatobject.c staticforward bites the dust. 2002-07-17 16:30:39 +00:00
frameobject.c Tim found that once test_longexp has run, test_sort takes very much 2002-08-01 18:50:33 +00:00
funcobject.c Extend function() to support an optional closure argument. 2002-07-11 18:30:27 +00:00
intobject.c int_lshift(): Simplified/sped overflow-checking. 2002-08-11 17:54:42 +00:00
iterobject.c Moved special case for tuples from iterobject.c to 2002-08-09 01:30:17 +00:00
listobject.c 1. Combined the base and length arrays into a single array of structs. 2002-08-10 05:21:15 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c x_mul(): This failed to normalize its result. 2002-08-12 06:17:58 +00:00
methodobject.c Introduce two new flag bits that can be set in a PyMethodDef method 2002-03-28 05:33:33 +00:00
moduleobject.c Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
object.c Replace abort with Py_FatalError. 2002-08-07 16:21:51 +00:00
obmalloc.c Remove extraneous semicolon. 2002-07-18 18:49:52 +00:00
rangeobject.c staticforward bites the dust. 2002-07-17 16:30:39 +00:00
sliceobject.c Silly typo. Not sure how that got in. 2002-07-19 15:52:38 +00:00
stringobject.c Implement stage B0 of PEP 237: add warnings for operations that 2002-08-11 04:24:12 +00:00
structseq.c Remove PyMalloc_New and PyMalloc_Del. 2002-04-12 03:05:37 +00:00
tupleobject.c Moved special case for tuples from iterobject.c to 2002-08-09 01:30:17 +00:00
typeobject.c Disallow class assignment completely unless both old and new are heap 2002-08-10 05:42:07 +00:00
unicodectype.c removed "register const" from scalar arguments to the unicode 2001-06-27 22:08:26 +00:00
unicodeobject.c Add C API PyUnicode_FromOrdinal() which exposes unichr() at C level. 2002-08-11 12:23:04 +00:00
unicodetype_db.h forgot to check in the new makeunicodedata.py script 2001-01-21 17:01:31 +00:00
weakrefobject.c Add support for the iterator protocol to weakref proxy objects. 2002-08-09 18:34:16 +00:00
xxobject.c staticforward bites the dust. 2002-07-17 16:30:39 +00:00