Package: fastuuid
FastUUID is a library which provides CPython bindings to Rust’s UUID library.The provided API is exactly as Python’s builtin UUID class.It is supported on Python 3.7, 3.8, 3.9 & 3.10.Why?It is much faster than Python’s pure-python implementation and it is stricter
when parsing hexadecimal representation of UUIDs.If you need to generate a lot of random UUIDs we also provide theuuid4_bulk()function which releases the GIL for the entire duration of the generation.
This allows other threads to run while the library generates UUIDs.Benchmarksprocessormachinepython compilerpython implementationpython implementation versionpython versionpython buildreleasesystemcpux86_64x86_64GCC 5.5.0CPython3.7.23.7.2default4.15.0-50-genericLinuxIntel(R) Core(TM) i7-7700HQ CPU @ 2.80GHznameminmaxmeanstddevmedianiqroutliersopsroundsiterationstests/test_benchmarks.py::test_parse_bytes_fastuuid8.770148269832134e-073.0054012313485146e-059.848993185755912e-076.654121944953314e-079.530049283057451e-072.6979250833392143e-08515;80801015332.20821621441493661tests/test_benchmarks.py::test_parse_bytes_uuid9.00006853044033e-072.4181994376704097e-051.0102117337399724e-066.361040394445994e-079.739887900650501e-073.899913281202316e-081130;10702989891.49165574731980201tests/test_benchmarks.py::test_parse_bytes_le_fastuuid9.00996383279562e-072.4662993382662535e-051.0116569599011118e-065.687526428398989e-079.840005077421665e-072.200249582529068e-08703;9368988477.35906225431630521tests/test_benchmarks.py::test_parse_bytes_le_uuid1.348991645500064e-063.5200006095692515e-051.5184524591452776e-069.295692916442362e-071.448992406949401e-063.897002898156643e-081620;12511658565.23460924851702711tests/test_benchmarks.py::test_parse_fields_fastuuid9.819923434406519e-073.2625976018607616e-051.217285795660234e-061.0234898538816672e-061.087988493964076e-066.702612154185772e-083199;12487821499.76904775911438441tests/test_benchmarks.py::test_parse_fields_uuid1.1137977708131076e-060.0001478094025515021.2054474234359692e-065.093104655522965e-071.144595444202423e-066.060581654310231e-082304;5896829567.49548613351679835tests/test_benchmarks.py::test_parse_hex_fastuuid9.870273061096668e-072.906599547713995e-051.11212962918218e-066.906885628642859e-071.0759977158159018e-063.0995579436421394e-08577;8272899175.75591917651432881tests/test_benchmarks.py::test_parse_hex_uuid1.3360113371163607e-062.6262016035616398e-051.4448148991822913e-067.064083638385458e-071.3989920262247324e-062.9016518965363503e-08679;4802692130.1826039868821561tests/test_benchmarks.py::test_parse_int_uuid5.448004230856896e-074.164349229540676e-066.099919819231937e-072.0401652680352933e-075.548994522541762e-074.430039552971725e-083607;39251639365.81075570978795120tests/test_benchmarks.py::test_parse_int_fastuuid8.950009942054749e-074.946498665958643e-051.0105578493921953e-066.873330198387691e-079.739887900650501e-072.1012965589761734e-08529;12534989552.45422264011760881tests/test_benchmarks.py::test_fast_uuidv35.410998710431158e-073.5570512409321965e-065.971385425220447e-071.672736409563351e-075.526497261598707e-072.949964255094524e-084865;63321674653.2484345268350820tests/test_benchmarks.py::test_uuidv33.6269775591790676e-064.193797940388322e-053.933511159797234e-061.4521217506191846e-063.782013664022088e-066.00120984017849e-08548;4193254225.79455743768535821tests/test_benchmarks.py::test_fast_uuidv41.47343598655425e-072.069187758024782e-061.6777362874701377e-077.169360028617447e-081.5453133528353646e-078.188180800061673e-096101;115505960412.29761980219841332tests/test_benchmarks.py::test_uuidv42.275977749377489e-065.939402035437524e-052.5699563458422217e-061.316784132061215e-062.38200300373137e-061.309963408857584e-072068;5815389111.667837409856101tests/test_benchmarks.py::test_fast_uuidv4_bulk_threads0.00098435199470259250.0072680049925111230.00144188289658017190.00075451854950198510.00120592699386179450.000328887006617151242;54693.53759752042235491tests/test_benchmarks.py::test_fast_uuidv4_threads0.00306932799867354330.0080870119854807850.0040096116037749350.0007156059134487620.00386507998337037860.000658847755403257953;19249.400714787070262731tests/test_benchmarks.py::test_uuidv4_threads0.0309995130228344350.068955410009948540.0400252715890846160.0099758621683735060.0364752064924687150.0087131990003399553;224.98421522947798221tests/test_benchmarks.py::test_fast_uuidv55.316498572938144e-074.090600123163313e-065.890041556925782e-071.8620985914996815e-075.419497028924525e-072.9799412004649576e-083998;64151697780.89056801218892120tests/test_benchmarks.py::test_uuidv53.7190038710832596e-065.8079982409253716e-054.403547300216035e-062.439066121654033e-063.910012310370803e-062.169981598854065e-072283;4139227089.64655629804573831Run them yourself to verify.What’s Missing?UUIDv1 generationPickle supportPRs are welcome.