You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
randint is a commonly needed function, but it is fairly slow (compared to random.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.
Activity
brianschubert commentedon Mar 19, 2025
Adding C implementations for
randomhas been rejected before. See #126149 for previous discussiongh-131435: random.randint optimization (gh-131436)