Skip to content

Instantly share code, notes, and snippets.

@ravenscroftj
Last active August 29, 2015 13:57
Show Gist options
  • Save ravenscroftj/9388067 to your computer and use it in GitHub Desktop.
Save ravenscroftj/9388067 to your computer and use it in GitHub Desktop.
for i in range(100000000):
print(i)
time python3 generator.py > result.txt
python3 generator.py > result.txt 68.76s user 0.83s system 93% cpu 1:14.35 total
time python3 while.py > result.txt
python3 while.py > result.txt 76.18s user 0.83s system 93% cpu 1:21.97 total
i = 0
while i < 100000000:
i += 1
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment