cheahjs / palworld-save-tools

Tools for converting Palworld .sav files to JSON and back
MIT License
790 stars 71 forks source link

Improve 17.2x performance for UUID == operate #144

Closed magicbear closed 7 months ago

magicbear commented 7 months ago

Test app: def perf(): uuid1 = toUUID(uuid.uuid4()) uuid2 = toUUID(uuid.uuid4()) t1 = time.time() for i in range(10000000): s=uuid1==uuid2 print(1000*(time.time()-t1))

Original by str spend: 5834.417343139648 Patched : 337.04090118408203