Python绑定到Rust的UUID库。
项目描述
FastUUID是一个库,它提供了CPython对Rust的UUID库的绑定。
提供的API与Python内置的UUID类完全相同。
它支持Python 3.7、3.8、3.9、3.10、3.11和3.12。
为什么?
它比Python纯Python实现要快得多,并且在解析UUID的十六进制表示时更加严格。
如果您需要生成大量随机UUID,我们还提供了uuid4_bulk()函数,该函数在整个生成过程中释放GIL。这允许其他线程在库生成UUID时运行。
基准测试
处理器 |
机器 |
python编译器 |
python实现 |
python实现版本 |
python版本 |
python构建 |
发布 |
系统 |
cpu |
---|---|---|---|---|---|---|---|---|---|
x86_64 |
x86_64 |
GCC 5.5.0 |
CPython |
3.7.2 |
3.7.2 |
默认 |
4.15.0-50-generic |
Linux |
Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz |
名称 |
最小值 |
最大值 |
平均值 |
标准差 |
中位数 |
四分位距 |
异常值 |
操作 |
轮次 |
迭代次数 |
---|---|---|---|---|---|---|---|---|---|---|
tests/test_benchmarks.py::test_parse_bytes_fastuuid |
8.770148269832134e-07 |
3.0054012313485146e-05 |
9.848993185755912e-07 |
6.654121944953314e-07 |
9.530049283057451e-07 |
2.6979250833392143e-08 |
515;8080 |
1015332.2082162144 |
149366 |
1 |
tests/test_benchmarks.py::test_parse_bytes_uuid |
9.00006853044033e-07 |
2.4181994376704097e-05 |
1.0102117337399724e-06 |
6.361040394445994e-07 |
9.739887900650501e-07 |
3.899913281202316e-08 |
1130;10702 |
989891.4916557473 |
198020 |
1 |
tests/test_benchmarks.py::test_parse_bytes_le_fastuuid |
9.00996383279562e-07 |
2.4662993382662535e-05 |
1.0116569599011118e-06 |
5.687526428398989e-07 |
9.840005077421665e-07 |
2.200249582529068e-08 |
703;9368 |
988477.3590622543 |
163052 |
1 |
tests/test_benchmarks.py::test_parse_bytes_le_uuid |
1.348991645500064e-06 |
3.5200006095692515e-05 |
1.5184524591452776e-06 |
9.295692916442362e-07 |
1.448992406949401e-06 |
3.897002898156643e-08 |
1620;12511 |
658565.2346092485 |
170271 |
1 |
tests/test_benchmarks.py::test_parse_fields_fastuuid |
9.819923434406519e-07 |
3.2625976018607616e-05 |
1.217285795660234e-06 |
1.0234898538816672e-06 |
1.087988493964076e-06 |
6.702612154185772e-08 |
3199;12487 |
821499.7690477591 |
143844 |
1 |
tests/test_benchmarks.py::test_parse_fields_uuid |
1.1137977708131076e-06 |
0.000147809402551502 |
1.2054474234359692e-06 |
5.093104655522965e-07 |
1.144595444202423e-06 |
6.060581654310231e-08 |
2304;5896 |
829567.4954861335 |
167983 |
5 |
tests/test_benchmarks.py::test_parse_hex_fastuuid |
9.870273061096668e-07 |
2.906599547713995e-05 |
1.11212962918218e-06 |
6.906885628642859e-07 |
1.0759977158159018e-06 |
3.0995579436421394e-08 |
577;8272 |
899175.7559191765 |
143288 |
1 |
tests/test_benchmarks.py::test_parse_hex_uuid |
1.3360113371163607e-06 |
2.6262016035616398e-05 |
1.4448148991822913e-06 |
7.064083638385458e-07 |
1.3989920262247324e-06 |
2.9016518965363503e-08 |
679;4802 |
692130.1826039868 |
82156 |
1 |
tests/test_benchmarks.py::test_parse_int_uuid |
5.448004230856896e-07 |
4.164349229540676e-06 |
6.099919819231937e-07 |
2.0401652680352933e-07 |
5.548994522541762e-07 |
4.430039552971725e-08 |
3607;3925 |
1639365.8107557097 |
87951 |
20 |
tests/test_benchmarks.py::test_parse_int_fastuuid |
8.950009942054749e-07 |
4.946498665958643e-05 |
1.0105578493921953e-06 |
6.873330198387691e-07 |
9.739887900650501e-07 |
2.1012965589761734e-08 |
529;12534 |
989552.4542226401 |
176088 |
1 |
tests/test_benchmarks.py::test_fast_uuidv3 |
5.410998710431158e-07 |
3.5570512409321965e-06 |
5.971385425220447e-07 |
1.672736409563351e-07 |
5.526497261598707e-07 |
2.949964255094524e-08 |
4865;6332 |
1674653.248434526 |
83508 |
20 |
tests/test_benchmarks.py::test_uuidv3 |
3.6269775591790676e-06 |
4.193797940388322e-05 |
3.933511159797234e-06 |
1.4521217506191846e-06 |
3.782013664022088e-06 |
6.00120984017849e-08 |
548;4193 |
254225.79455743768 |
53582 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4 |
1.47343598655425e-07 |
2.069187758024782e-06 |
1.6777362874701377e-07 |
7.169360028617447e-08 |
1.5453133528353646e-07 |
8.188180800061673e-09 |
6101;11550 |
5960412.297619802 |
198413 |
32 |
tests/test_benchmarks.py::test_uuidv4 |
2.275977749377489e-06 |
5.939402035437524e-05 |
2.5699563458422217e-06 |
1.316784132061215e-06 |
2.38200300373137e-06 |
1.309963408857584e-07 |
2068;5815 |
389111.667837409 |
85610 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4_bulk_threads |
0.0009843519947025925 |
0.007268004992511123 |
0.0014418828965801719 |
0.0007545185495019851 |
0.0012059269938617945 |
0.0003288870066171512 |
42;54 |
693.5375975204223 |
549 |
1 |
tests/test_benchmarks.py::test_fast_uuidv4_threads |
0.0030693279986735433 |
0.008087011985480785 |
0.004009611603774935 |
0.000715605913448762 |
0.0038650799833703786 |
0.0006588477554032579 |
53;19 |
249.40071478707026 |
273 |
1 |
tests/test_benchmarks.py::test_uuidv4_threads |
0.030999513022834435 |
0.06895541000994854 |
0.040025271589084616 |
0.009975862168373506 |
0.036475206492468715 |
0.008713199000339955 |
3;2 |
24.98421522947798 |
22 |
1 |
tests/test_benchmarks.py::test_fast_uuidv5 |
5.316498572938144e-07 |
4.090600123163313e-06 |
5.890041556925782e-07 |
1.8620985914996815e-07 |
5.419497028924525e-07 |
2.9799412004649576e-08 |
3998;6415 |
1697780.8905680121 |
88921 |
20 |
tests/test_benchmarks.py::test_uuidv5 |
3.7190038710832596e-06 |
5.8079982409253716e-05 |
4.403547300216035e-06 |
2.439066121654033e-06 |
3.910012310370803e-06 |
2.169981598854065e-07 |
2283;4139 |
227089.64655629804 |
57383 |
1 |
亲自运行它们以进行验证。
欢迎提出改进建议。
项目详情
下载文件
下载适用于您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。
源代码分发
构建版本
fastuuid-0.9.3.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | dbfb12283011c431d36235f3dd1cf0ff246ef90c8c57ef2d4a7a0fe39385db17 |
|
MD5 | fb080eb45e609a3b541b1e4ace3298d4 |
|
BLAKE2b-256 | f06bbcc65820d14556f0d998e24869c981d8e12522ed9013afdf3c077e04239e |
fastuuid-0.9.3-cp312-none-win_amd64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | aef07be44c74902a948c5525981fe7d426e8715ba14ab5f3b103b3e3af30b7b6 |
|
MD5 | d2a0a935e974e11b22df48085da654f2 |
|
BLAKE2b-256 | 553a395020603a8c1995d24ef0e10a2cfdf0ef2a55b273fc907cd34d73c3c39a |
fastuuid-0.9.3-cp312-cp312-manylinux_2_34_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 98a64b7f68d3e69b58959e70f9766216806c9bc76d54d55f91c331843714a87a |
|
MD5 | fc74d44191aa73f29e16fecc7d095829 |
|
BLAKE2b-256 | e4987f0d010d2ca305c4d6fb707c01a7b0bbf5604363d06494da0acda855ba83 |
fastuuid-0.9.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1f4424990ebba385be3a71c2e5c1c6c1450f4d8595157b95c5f315ad2a1de25f |
|
MD5 | dc9a0bf2da0cdea5b56da1f12500d928 |
|
BLAKE2b-256 | 2fdecb803da3b6d2d7617e060b4d6e8166d50132112d56eebcbe370329558b07 |
fastuuid-0.9.3-cp312-cp312-macosx_11_0_arm64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a37f0e753757cc9846e5289509f84b2e0d13af0ebc524af91fd9c736f359634d |
|
MD5 | d48139e0a51030c010244ef56df36351 |
|
BLAKE2b-256 | 47e3ea927e3a2166b582caef02e2dfac9209243fc6074f54a114d38ea63b99de |
fastuuid-0.9.3-cp311-none-win_amd64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | bcf7fe1d3e77a4c27cc00010061c1731f401e83f244c86aeb16df59824339f92 |
|
MD5 | 80f9bced277ce0c30b9ccc636f296f2a |
|
BLAKE2b-256 | f59d89b12f709535eead9cc08b1c1b025795e2298b0bd6b4d706046ad800c738 |
fastuuid-0.9.3-cp311-cp311-manylinux_2_34_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d15c35ecd8f902ef0dd38e756faafe376dc1918f0d059a5d3eeda59167805e34 |
|
MD5 | 1a09e4d4d451d5f1e772dee83fc626f6 |
|
BLAKE2b-256 | 856db03de3075d6bb5e8fdb41269e05db09498941f17864d9e5b8c5135d8fb95 |
fastuuid-0.9.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | a5cd1232e66cb785c55f8632941a187637c16f874b97609032539d40981a48b2 |
|
MD5 | 4b8c24fd8a4834dffa9158513f870355 |
|
BLAKE2b-256 | a8e602705725e2b96398cead5f5e1488e87805f1dc1b77a0a1d35878cfde7183 |
fastuuid-0.9.3-cp311-cp311-macosx_11_0_arm64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 7032057bcf27ab0a7e1f15bca0cb3231153236374825b62bc113838ddfb99e33 |
|
MD5 | bcfaed59b493b2e864343422f2de7037 |
|
BLAKE2b-256 | 81cae313a256061208bf06eb28a9d58a9bbf36ba07dc36a71bd84aa4f0f9cf3c |
fastuuid-0.9.3-cp310-none-win_amd64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 484998dc235e487895107d4fa6830419c5ad9ad43cff8045f238b9f9b8af9c4e |
|
MD5 | 5243371eb9c1a27cf2f7b4e869d611be |
|
BLAKE2b-256 | 65b81a1ddc64fd884c77ef1d0ad685c6e78bcefe23025b323182d801db9573ad |
fastuuid-0.9.3-cp310-cp310-manylinux_2_34_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d24ad6ce6127fb474d5d0d37bc4f76e939c2142c830dae3878e60523ec4f4e39 |
|
MD5 | 3b33a1891e3e3161a7f622bee7d99862 |
|
BLAKE2b-256 | a1275b4bef52e0bd314685d113460b7d1820640cbac61b70231f5abc81505bd4 |
fastuuid-0.9.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 96f0c985c54023aeaa194d668c106069f1943cecc98825cded3b80fef4115a86 |
|
MD5 | d1fa8d39e63ffff7c68233d433af474b |
|
BLAKE2b-256 | 0aa773e76465f20e20fd7d279cb7945938cd6ae286cab09dfb6719a133777640 |
哈希值 for fastuuid-0.9.3-cp310-cp310-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 789e9edc97ba92bbc100fa063cea7b35e47218e7bf40693f66ff89cca7b1c474 |
|
MD5 | 532be663953656024088fa8e20e8ff05 |
|
BLAKE2b-256 | 55f393bd6a061ce6b5718a6445de9d8d3ea4b5ededd4ed1109204caa9f87bcef |
哈希值 for fastuuid-0.9.3-cp39-cp39-manylinux_2_34_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 33e69461a992070a7a4eccf158e34600ce0a9a2735c7f2e0d052b764c2ee6659 |
|
MD5 | 056ca9a3d34634e9247c9c918b25dc1f |
|
BLAKE2b-256 | 1cf6e207eb0fe54d9deeb3c5e9e1d0f2ce8715cf2d8128ac148f535ff3333402 |
哈希值 for fastuuid-0.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 251e7301e9de1aebe1bce55c50cfe87e794b320553926c2a04586f02527f6796 |
|
MD5 | 4a0073d522cc564fca65469dd23a8019 |
|
BLAKE2b-256 | 292ffb609bbee730e81aa8fc561b66ebc630382a4a5403273aad53fee008894e |
哈希值 for fastuuid-0.9.3-cp39-cp39-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 86351b332dcdfe9ecaff4368a5c445e263d3f4d7df37be838d63a7ea9a354a0e |
|
MD5 | c177a0a9eab02c0ae24dcd56eb831f54 |
|
BLAKE2b-256 | 68b648af3618fdf5020886676e474d5048bd5cf8620f368119cbb9f3abcfa686 |
哈希值 for fastuuid-0.9.3-cp38-cp38-manylinux_2_34_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 25cebc53c4bd3e307e06a7f99cbbcb63a6d39970ff4beb6847b3e78828591fd7 |
|
MD5 | 9fc5ec5c41c9644f8528096da7e7e9af |
|
BLAKE2b-256 | 7d7f57301924a0cb454a667e2c8ef8d65f730e9f3f0d1cdf2a59f4f13b03995a |
哈希值 for fastuuid-0.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e129e69646c8a94239a138a39c24e5c680b125abad592ca111c94cd21503f749 |
|
MD5 | 5352c3daacc99092919acbe7b3de960e |
|
BLAKE2b-256 | 75f93e213e16adf4dd97ad61903a1fd98734f55e60570e61b38bd403ef4a1726 |
哈希值 for fastuuid-0.9.3-cp38-cp38-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9d3ef6a8551985c1dae7c06d200b2b3e4270551beb9792ff7620f018d941e941 |
|
MD5 | 6617226c1c8c7b857e9582e4c1aaec1b |
|
BLAKE2b-256 | f6c4c4f34e2173c05a0f20ab0a6b04ea3cbf9d4c98d22f6a97697626220faac5 |
哈希值 for fastuuid-0.9.3-cp37-cp37m-manylinux_2_34_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 53ab936d5df488720e0054f463dbd29d9773c35e8a7702ba8c29780b36b452a8 |
|
MD5 | 5a3bc0a811af05a8938604ad93227888 |
|
BLAKE2b-256 | 936ebb2ca3a10f113d1aabf35900dc9296f59582bf1d71b70606702644ac3020 |
哈希值 for fastuuid-0.9.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | f898d0c7d7bd5d89a138115c84479f4a2a11056bccd4aef373b81c824282362a |
|
MD5 | b933a940f9bc7e1ce1458dd3b3c7cb9e |
|
BLAKE2b-256 | 757b4a8d5be4b5759e0096d2a0548e29dd749d315fd0d3e7f3e2c6229e047865 |