Skip to content

gh-128150: improve performances of uuid.uuid* constructor functions. #128151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0d49ccb
improve performance of UUIDs creation
picnixz Dec 19, 2024
603335f
add What's New entry
picnixz Dec 19, 2024
154ff8b
blurb
picnixz Dec 21, 2024
b965887
fix issue number
picnixz Dec 21, 2024
a8a1894
fix typos
picnixz Dec 21, 2024
c8aa752
ensure 14-bit clock sequence
picnixz Dec 21, 2024
8c9d5cf
Merge branch 'main' into perf/uuid/init-128150
picnixz Dec 21, 2024
a2278b8
add dedicated private fast constructor
picnixz Dec 21, 2024
0710549
revert UUIDv1 construction
picnixz Dec 21, 2024
5b6922f
change eager check into an assertion check for internal constructor
picnixz Dec 22, 2024
e631593
update performance results
picnixz Dec 22, 2024
1c10901
describe constants
picnixz Dec 23, 2024
0bc7321
revert UUIDv1 optimizations to reduce the diff
picnixz Dec 23, 2024
26b1eb1
simplify `_from_int` private constructor as per Pieter's review
picnixz Dec 23, 2024
df50a7a
revert micro-optimization of `not a <= x <= b`
picnixz Dec 23, 2024
c1ffa7d
use built-in `int` when it is not shadowed
picnixz Dec 23, 2024
cff86e9
remove rationale comment for HACL* MD5
picnixz Dec 23, 2024
7095aa4
remove rationale comment for OpenSSL SHA-1
picnixz Dec 23, 2024
4af1535
clear variant and version bits using dedicated mask
picnixz Dec 23, 2024
0d4c008
fix typos
picnixz Dec 25, 2024
9854f69
update benchmarks
picnixz Dec 25, 2024
897902b
remove un-necessary assertions
picnixz Dec 26, 2024
a8a19e1
use `object.__new__` instead of `cls.__new__`
picnixz Dec 26, 2024
ccb972b
Merge branch 'main' into perf/uuid/init-128150
picnixz Dec 27, 2024
e2b8b08
remove dedicated constant folding
picnixz Dec 27, 2024
1d4216a
update benchmarks
picnixz Dec 27, 2024
5c87adf
Always use `hashlib.md5` for consistency as per Petr's comment.
picnixz Jan 12, 2025
ea23629
update benchmarks
picnixz Jan 12, 2025
6d89e9d
Merge branch 'main' into perf/uuid/init-128150
picnixz Jan 13, 2025
bdf7c6e
update NEWS
picnixz Jan 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix typos
  • Loading branch information
picnixz committed Dec 21, 2024
commit a8a1894a7f4fb4f034036c4ebcee043ffa4d057c
3 changes: 2 additions & 1 deletion Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,8 @@ io
uuid
----

* Improve generations of UUID objects via their dedicated functions:
* Improve generation of :class:`~uuid.UUID` objects via their dedicated
functions:

* For a given 48-bit hardware address *node* and a given 14-bit
clock sequence *clock_seq*, :func:`uuid1(node=node) <uuid.uuid1>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Improve generations of UUID objects via their dedicated functions by 20%.
Patch by Bénédikt Tran.
Improve generation of :class:`~uuid.UUID` objects via their dedicated
functions by 20%. Patch by Bénédikt Tran.
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy