[Patches] [ python-Patches-560379 ] Karatsuba multiplication

noreply@sourceforge.net noreply@sourceforge.net
Fri, 24 May 2002 20:23:18 -0700


Patches item #560379, was opened at 2002-05-25 03:07
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=560379&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Christopher A. Craig (ccraig)
Assigned to: Nobody/Anonymous (nobody)
Summary: Karatsuba multiplication

Initial Comment:
Adds Karatsuba multiplication to Python.  
Patches longobject.c to use Karatsuba multiplication in
place
of gradeschool math.



----------------------------------------------------------------------

Comment By: Christian Tismer (tismer)
Date: 2002-05-25 05:23

Message:
Logged In: YES 
user_id=105700

Hmm, not bad.

Q: You set the split fence at 40. Where does this number
come from? I think this could be optimzed per compiler/platform.

You say that you split based on the smaller number.
Why this? My intuitive guess would certainly be to always split
on the larger number. I just checked my Python implementation
which does this.
Open question: how to handle very small by very long the
best way? Probably the highschool version is better here,
and that might have led you to investigate the smaller one.
I'd say bosh should be checked.

good work! - cheers chris


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=560379&group_id=5470