]> git.ipfire.org Git - thirdparty/psycopg.git/commit
perf(uuid): speed up UUID creation using a writable subclass
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 8 Feb 2025 15:36:25 +0000 (16:36 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 20 Feb 2025 10:09:29 +0000 (11:09 +0100)
commit88e283ef4e39115a9f05eeda7eaa9a337765fa20
tree33857d8c1c1913035772ffc40a59b6868bc58e9f
parentf7a54dcd5c89e9fbac1aef6ee274387fdede598b
perf(uuid): speed up UUID creation using a writable subclass

Introduce an object memory-compatible with UUID, but writable. Try to
create this object in the fastest possible way: calling __new__ and
setting its attributes. Then replace the class with the standard UUID.
psycopg_c/psycopg_c/_uuid.py [new file with mode: 0644]
psycopg_c/psycopg_c/types/uuid.pyx