@@ -91,5 +91,36 @@ assert my_uuid < uuid7()
9191
9292This implementation does not include a clock sequence counter as defined in the draft RFC.
9393
94+ ## Performance
95+
96+ MacBook Air
97+ ```
98+ Python 3.9.7 (default, Oct 12 2021, 22:38:23)
99+ [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
100+ Type "help", "copyright", "credits" or "license" for more information.
101+ >>> import timeit
102+ >>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1")
103+ 0.14462158300011652
104+ >>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6")
105+ 0.2687861250000019
106+ >>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7")
107+ 0.22819437500000106
108+ ```
109+
110+ Google [ Cloud Shell] [ cloud shell ] VM
111+ ```
112+ Python 3.7.3 (default, Jan 22 2021, 20:04:44)
113+ [GCC 8.3.0] on linux
114+ Type "help", "copyright", "credits" or "license" for more information.
115+ >>> import timeit
116+ >>> timeit.timeit('uuid1()', number=100000, setup="from uuid import uuid1")
117+ 1.2075679750000745
118+ >>> timeit.timeit('uuid6()', number=100000, setup="from uuid6 import uuid6")
119+ 0.6328954440000416
120+ >>> timeit.timeit('uuid7()', number=100000, setup="from uuid6 import uuid7")
121+ 0.4709622599998511
122+ ```
123+
94124[ ietf draft ] : https://github.com/uuid6/uuid6-ietf-draft
95125[ draft 02 ] : https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-02#section-4.4
126+ [ cloud shell ] : https://cloud.google.com/shell/docs
0 commit comments