this post was submitted on 11 Feb 2025
362 points (95.2% liked)

Technology

63614 readers
4384 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 2 weeks ago (2 children)

anything that deserializes arbitrary json will put it into a hash table, right? it would definitely speed up the web.

[–] [email protected] 5 points 2 weeks 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.

[–] [email protected] 4 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Using bencode over json would probably speed up the web more. Not to mention good ole ASN.1 (well, at least some binary schemes for ASN.1). The web is completely cooked when it comes to efficiency.

[–] [email protected] 3 points 2 weeks ago (2 children)

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.

[–] [email protected] 5 points 2 weeks ago (1 children)

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.

[–] [email protected] 4 points 2 weeks ago (1 children)

And yet all that pales in comparison to using react (or whatever framework) over vanilla js. Enter McMaster-Carr.

[–] [email protected] 2 points 2 weeks ago

yupyup, just send HTML over the wire. it's fine.