• zkfcfbzr@lemmy.world
      link
      fedilink
      English
      arrow-up
      18
      ·
      1 month 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
        link
        fedilink
        English
        arrow-up
        1
        arrow-down
        2
        ·
        edit-2
        1 month 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.

        Just reading the title, it’s talking about searching hash tables, which wasn’t something I was specifically doing.

    • lime!@feddit.nu
      link
      fedilink
      English
      arrow-up
      10
      ·
      1 month ago

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

      • frezik@midwest.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 month 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
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        1 month ago

        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.

        • lime!@feddit.nu
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 month 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.