std:hash vs crc32



  • What function is used to create a xash in std::hash, and how much prefers it to normal crc32? Less conflicts, quicker calculations are preferred. The base is the 32nd battle system. The extracts from the standard are not welcomed as a response.



  • The base is the 32nd battle system.

    Do you realize that crc32 and the deficiency of your system are irrelevant? crc32 was also used in 16-bit MS-DOS LOs. And 32 is just the size of the whale in battle.

    What function is used to create a hash in std:

    std:hash is not a function, but a template, so it will use different aggregation algorithms, for example, std::hash for int 1 https://stackoverflow.com/q/38304877/5006740 1, Hash for number is the number.

    Besides, you didn't tell me exactly what standard C+++ library you're using. In theory, you can imagine a library that uses crc32 for all hexing (and works very badly).

    crc32 is used for small data, but fast. md5 slowly, but it is much harder to break into conflict (32 Bita É 128 bats md5)

    Response to comments:

    I matched crc32 with xash c+11, and in turn it depends. The battle of the axle. And for correct comparison, they must be one. Level

    depending on the ISO standard, then the compiler developer. How he handles the heshing, his own business, if not prescribed in the standard, and, yes, it's std:

    The actual hash functions are implementation-dependent Which means that clang and msvc and gcc and everyone else can do differently. Did I ask about md5 and his speed? He's outdated. Where am I? I don't use it.

    That's the news. md5 vulnerable to deliberate attacks (you can create a conflict specially), so it's outdated as a cryptographic hose (thank you to @D-side for the right) but not as a function of heshing. https://stackoverflow.com/a/1323046/5006740 md5/sha1)

    default function for gcc - MurmurHashUnaligned2

    And here you are. https://softwareengineering.stackexchange.com/a/145633/231059 Comparison of various xash algorithms




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2