Stefan Pochmann <stefan.pochm...@gmail.com> added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to