Message40130
Logged In: YES
user_id=31435
Thanks! I checked in some code building on this. Changes
included:
+ Adjusted whitespace to meet the standard (spaces
after "if" and "for", flanking binary operators, etc).
+ The refcount fiddling in x_mul caused assorted system
crashes if KeyboardInterrupt was raised during a multiply.
Repaired that.
+ More comments and asserts.
+ Removed k_join and built "the answer" piecemeal into the
result object in k_mul. This allows to free more chunks of
memory sooner, reducing highwater mark and the probable
size of the working set.
Since the cache behavior is quite different now, it would be
cool if you could run your tuning tests again. The cutoff
value is now a #define, KARATSUBA_CUTOFF near the top
of longobject.c.
Until I can make time for more thorough testing, k_mul isn't
called by default: multiplication invokes k_mul if and only if
an environment variable named KARAT exists (its value is
irrelevant; just its existence matters). |
|
Date |
User |
Action |
Args |
2007-08-23 15:13:24 | admin | link | issue560379 messages |
2007-08-23 15:13:24 | admin | create | |
|