dictionarygo

What data structure do Go maps use internally?


I'm interested in the following:


Solution

  • Go maps are hash tables internally

    As @twotwotwo clarified in the comment, Go will use an AES-based hash if the CPU has supporting instructions for it.

    Otherwise Go will use a FNV hash function (As stated by Patrick Mylund Nielsen @ Go-Nuts)

    Links: