1
0
Fork 0

Feedback on ex0.* and ex1.*

This commit is contained in:
Eric-Teunis de Boone 2020-05-06 11:43:09 +02:00
parent e363d023cd
commit 982866a7e6
6 changed files with 47 additions and 21 deletions

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import numpy as np
import sys
N = 1e6
if len(sys.argv) > 1:
N = float(sys.argv[1])
for _ in range(int(N)):
print( np.random.rand(1) )

View file

@ -1,4 +1,10 @@
Running `time ./gen_rand.py "1e9"` gives
Running `time ./gen_rand.py "1e6"` gives
real 0m13.803s
user 0m8.874s
real 0m0.237s
user 0m0.160s
Contrast this to the following:
Running `time ./gen_rand_explicit.py "1e6"` gives
real 2m11.564s
user 2m1.950s