This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, draghuram, mark.dickinson, rhettinger, stutzbach
Date 2010-05-13.23:40:18
SpamBayes Score 0.000934436
Marked as misclassified No
Message-id <>
In-reply-to <>
On Wed, May 12, 2010 at 3:47 PM, Mark Dickinson <> wrote:
> Realistically though, I don't see an iterative version of factorial_part_product as
> an option for the C patch, without a significant increase in complexity.  Daniel's
> current patch is remarkably clean and simple, and I'd like to keep it that way.

I am attaching an iterative version in C patch.  I don't think it
represents a dramatic increase in complexity ~ 40 lines over Daniel's

> I did think about various evil schemes for an iterative version, ...

I would not say my patch is evil, maybe a bit naughty. :-) It can be
made less evil by resizing the list instead of filling its tail with
NULLs or more evil by using a tuple instead of list.

The performance  appears to be identical to Daniel's with no small
integer multiplication optimization.  The later gives about 2%
File name Uploaded
factorial-no-recursion.patch belopolsky, 2010-05-13.23:40:15
Date User Action Args
2010-05-13 23:40:23belopolskysetrecipients: + belopolsky, rhettinger, mark.dickinson, draghuram, stutzbach
2010-05-13 23:40:20belopolskylinkissue8692 messages
2010-05-13 23:40:19belopolskycreate