anything that deserializes arbitrary json will put it into a hash table, right? it would definitely speed up the web.
I don’t think the speed of hash tables is a problem in most applications.
lime@feddit.nu 1 week ago
frezik@midwest.social 1 week 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 1 week 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 1 week 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.
frezik@midwest.social 1 week ago
JSON libraries are stupidly well optimized. There are binary encoding schemes that are faster and more compact, but its hard to beat JSON for text-based.
barsoap@lemm.ee 1 week ago
And yet all that pales in comparison to using react (or whatever framework) over vanilla js. Enter McMaster-Carr.
zkfcfbzr@lemmy.world 1 week 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 1 week 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 1 week ago
Sorry to be blunt, but you don’t know what you’re talking about.
source_of_truth@lemmy.world 1 week ago
How much do you think this speeds up an average program? Enlighten us with your knowledge.
deegeese@sopuli.xyz 1 week 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?
source_of_truth@lemmy.world 1 week ago
I know that, but phrased that way it sort of sounds like they’re iterating over the entire thing.