|
|
Subscribe / Log in / New account

Python sets, frozensets, and literals

Python sets, frozensets, and literals

Posted Jan 19, 2022 19:53 UTC (Wed) by Wol (subscriber, #4433)
In reply to: Python sets, frozensets, and literals by ballombe
Parent article: Python sets, frozensets, and literals

???

I know managing the key has a cost but, given a known key, the cost for a Pick database (and Python and Berkeley/Sleepycat use the same technique) to access the data truly is order one. And the cost to add a new key is order one, too!

Which is why Pick kicks seven bells out of Relational for speed, because it doesn't hide its internals, and it's simple maths to prove you just cannot retrieve/store data any faster. From the FAQ, "SQL optimises the easy task of finding data in memory. Pick optimises the hard task of getting it there in the first place".

(If you don't know, there are two techniques that are pretty much the same, Linear, and Dynamic hashing. Pick I know uses Dynamic, I'm not sure which Python and Berkeley use.)

Cheers,
Wol


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds