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 Stefan Pochmann
Recipients PedanticHacker, Stefan Pochmann, mark.dickinson, mcognetta, pablogsal, rhettinger, serhiy.storchaka, tim.peters
Date 2021-11-15.06:31:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636957905.14.0.983462022187.issue37295@roundup.psfhosted.org>
In-reply-to
Content
Turns out for n=100_000, k=50_000, about 87% of my factors are 1, so they don't even need to be turned into Python ints for multiplication, improving the multiplication part to 3.05 ms. And a C++ version to produce the factors took 0.85 ms. Updated estimation:

1510.4 ms  math.comb(n, k)
 460.8 ms  factorial(n) // (factorial(k) * factorial(n-k))
   3.9 ms  *estimation* for mycomb if written in C
History
Date User Action Args
2021-11-15 06:31:45Stefan Pochmannsetrecipients: + Stefan Pochmann, tim.peters, rhettinger, mark.dickinson, serhiy.storchaka, PedanticHacker, mcognetta, pablogsal
2021-11-15 06:31:45Stefan Pochmannsetmessageid: <1636957905.14.0.983462022187.issue37295@roundup.psfhosted.org>
2021-11-15 06:31:45Stefan Pochmannlinkissue37295 messages
2021-11-15 06:31:45Stefan Pochmanncreate