This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kevinlondon
Recipients kevinlondon, ronaldoussoren
Date 2014-08-04.02:05:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Generating the byte representation of a UUID object can be a little faster by using binascii's unhexlify on the hex value of the UUID object. In my testing, I saw about a 5.5x speed increase with the attached changes. 

Here are a set of benchmarks that I ran, which are inspired by Wang Chun's benchmarks on

My times:

kevin$ python 100000
Original Average: 8.049 microseconds
Updated Average: 1.447 microseconds
I re-ran all of the tests with the patched uuid module and they passed. Here's my patchcheck output as well:

kevin$ make patchcheck
./python.exe ./Tools/scripts/
Getting the list of files that have been added/changed ... 1 file
Fixing whitespace ... 0 files
Fixing C file whitespace ... 0 files
Fixing docs whitespace ... 0 files
Docs modified ... NO
Misc/ACKS updated ... NO
Misc/NEWS updated ... NO
configure regenerated ... not needed regenerated ... not needed

Date User Action Args
2014-08-04 02:05:56kevinlondonsetrecipients: + kevinlondon, ronaldoussoren
2014-08-04 02:05:56kevinlondonsetmessageid: <>
2014-08-04 02:05:56kevinlondonlinkissue22131 messages
2014-08-04 02:05:55kevinlondoncreate