]> 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:15:41 +0000 (11:15 +0100)
commit393e162fc377f6064ca78a3d11d4a8e9e9b84272
tree552ec28e5a0bd7ba25247fe23ace3b18e1cfe635
parent57a3889949b582407f327764cc403ba309b83623
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