In my tests, using bytes.hex() speeds up calling the UUID.hex property.
Additionally, using the hex property and f-strings also provides some speedup in calling uuid.UUID.str.
hex
before: 0.021755493999989994
after: 0.01465080400066654
str
before: 0.06381790500017814
after: 0.05134949700004654
Feature or enhancement
Proposal:
In my tests, using bytes.hex() speeds up calling the UUID.hex property.
Additionally, using the hex property and f-strings also provides some speedup in calling uuid.UUID.str.
Results before and after the fix:
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
uuid.__str__()performance a little more #140663