Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/python/bench/src/uuid_.py
1067 views
1
# Benchmark computing uuid's
2
3
# Strangely, pypy is really bad on this benchmark compared to python-native and pylang.
4
5
from bench import register, all
6
7
from uuid import uuid4
8
9
10
def compute_uuids(n=10**5):
11
for i in range(n):
12
uuid4()
13
14
15
register('compute_uuids', compute_uuids)
16
17
if __name__ == '__main__':
18
all()
19
20