Last active
June 14, 2016 16:39
-
-
Save msukmanowsky/8f18c670e7ad1095a95e4470c079a667 to your computer and use it in GitHub Desktop.
To run `pip install numpy psutil` and then `time python <script> <set size>`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
import sys | |
import numpy as np | |
import psutil | |
num_users = int(sys.argv[1]) | |
users = np.unique(list(str(uuid.uuid4()) for _ in xrange(num_users))) | |
print len(users) | |
print '{} mb'.format(psutil.Process().memory_info().rss >> 20) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import uuid | |
import psutil | |
num_users = int(sys.argv[1]) | |
users = set(list(str(uuid.uuid4()) for _ in xrange(num_users))) | |
print len(users) | |
print '{} mb'.format(psutil.Process().memory_info().rss >> 20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment