I don’t think the speed of hash tables is a problem in most applications.
tyler@programming.dev 2 months ago
This is incredible, but why does the article end by stating that this might not have any immediate applications? Shouldn’t this immediately result in more efficient hash tables in everyday programming languages?
source_of_truth@lemmy.world 2 months ago
zkfcfbzr@lemmy.world 2 months ago
Hash tables are often used behind the scenes. dicts and sets in python both utilize hash tables internally, for example.
source_of_truth@lemmy.world 2 months ago
I’ve only used java but java hash tables are stupid fast in my experience, like everything else in my crap programs was 1000 times slower than the hash table access or storage.
0x0@lemmy.dbzer0.com 2 months ago
Sorry to be blunt, but you don’t know what you’re talking about.
deegeese@sopuli.xyz 2 months ago
If you use a hash table, you search every time you retrieve an object.
If you didn’t retrieve, why would you be storing the data in the first place?
lime@feddit.nu 2 months ago
anything that deserializes arbitrary json will put it into a hash table, right? it would definitely speed up the web.
frezik@midwest.social 2 months ago
Depends on the implementation, but most will, yes. There are other forms of associative arrays, like trie or binary tree, but hash is the most common.
barsoap@lemm.ee 2 months ago
Using bencode over json would probably speed up the web more. Not to mention good ole X.690. The web is completely cooked when it comes to efficiency.
lime@feddit.nu 2 months ago
the biggest speedup would probably come from using proper schemas that can be efficiently parsed. but we’ve made our bed out of ad-hoc protocols.
rockSlayer@lemmy.world 2 months ago
Infrastructural APIs are much slower to change, and in a lot of cases the use of those APIs are dependent on a specific version. The change will definitely occur over time as the practical limitations are discovered
OhNoMoreLemmy@lemmy.ml 2 months ago
Hash trees are super efficient when they’re not nearly full. So the standard trick is just to resize them when they’re too close to capacity.
The new approach is probably only going to be useful in highly memory constrained applications, where resizing isn’t an option.
deegeese@sopuli.xyz 2 months ago
Hash tables are used in literally everything and they always need to minimize resizing because it’s a very expensive operation.
I suspect this will silently trickle into lots of things once it gets picked up by standard Python and JavaScript platforms, but that will take years.
Sekoia@lemmy.blahaj.zone 2 months ago
So… databases? Especially in data centers? Still a nice boost in that case