"Frode Øijord" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > However, this is way too slow for my needs. I try to use this to > generate all possible 5 card poker hands, but this takes around 17 > seconds on an Athlon 2200. That's a 2 orders of magnitude too slow for > my needs.
The set of all possible 5-card poker hands is a constant. It appears you need it over and over. But it is not clear to me whether you only need a generator to iterate over the set or the whole set at once. If the latter, one option is to generate it once, save to disk, and read it in. I'd try both marshal and cpickle modules for read-in time. Terry J. Reedy
-- http://mail.python.org/mailman/listinfo/python-list