Running `time ./gen_rand.py "1e9"` gives real 0m13.803s user 0m8.874s