[BUG] random.random_float64
is extremely slow
#2388
Labels
bug
Something isn't working
mojo
Issues that are related to mojo
mojo-repo
Tag all issues with this label
mojo-stdlib
Tag for issues related to standard library
Bug description
Generating one random number at a time in a for loop is extremely slow, almost 2 orders of magnitude slower than a numba-jitted equivalent.
Context: I tried to use a simple Monte Carlo approach to calculate Pi by generating two random numbers in a box one at a time and checking whether they are inside the inscribed circle.
Steps to reproduce
System information
The text was updated successfully, but these errors were encountered: