random.randint performance improvement #131435
Labels
performance
Performance or resource usage
stdlib
Python modules in the Lib dir
type-feature
A feature request or enhancement
Feature or enhancement
Proposal:
randint
is a commonly needed function, but it is fairly slow (compared torandom.random
).Maybe it would be good to port couple of lower level functions to
C
.But for the time being, this small edit results in 20% better performance by avoiding unnecessary abstractions.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: