• deadcream@sopuli.xyzOP
    link
    fedilink
    arrow-up
    6
    ·
    29 days ago

    tl;dr:

    std::unordered_map is one of the worst ones, boost::unordered_flat_map and absl::flat_hash_map are one of the best.

    • lysdexic@programming.devM
      link
      fedilink
      English
      arrow-up
      2
      ·
      27 days ago

      std::unordered_map is one of the worst ones

      It should be noted that the benchmark focused on the std::unordered_map implementation from GCC 13.2.0. I’m not sure if/how this conclusion can be extended to other implementations such as msvc or clang.

      • deadcream@sopuli.xyzOP
        link
        fedilink
        arrow-up
        4
        ·
        27 days ago

        Well the author claims that it’s not possible for std::unordered_map to get close to other implementations because of constraints that the standard imposes on it. I.e. faster implementations simply behave slightly differently (in ways that are not important to most users).