{"id":13731505,"url":"https://github.com/martinus/robin-hood-hashing","last_synced_at":"2025-09-27T10:30:55.751Z","repository":{"id":9748545,"uuid":"11712291","full_name":"martinus/robin-hood-hashing","owner":"martinus","description":"Fast \u0026 memory efficient hashtable based on robin hood hashing for C++11/14/17/20","archived":true,"fork":false,"pushed_at":"2023-05-01T21:43:58.000Z","size":9197,"stargazers_count":1569,"open_issues_count":21,"forks_count":150,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-06-08T17:59:23.332Z","etag":null,"topics":["c-plus-plus","container","cpp","cpp11","cpp14","hash","hash-tables","header-only","no-dependencies","single-file","stl-containers","unordered-maps"],"latest_commit_sha":null,"homepage":"https://gitter.im/martinus/robin-hood-hashing","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["martinus"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2013-07-27T23:03:45.000Z","updated_at":"2025-06-06T16:34:10.000Z","dependencies_parsed_at":"2024-01-31T09:03:04.881Z","dependency_job_id":"5fe2838a-9424-45ff-8718-1bdd7ff1ed74","html_url":"https://github.com/martinus/robin-hood-hashing","commit_stats":{"total_commits":826,"total_committers":19,"mean_commits":"43.473684210526315","dds":0.1271186440677966,"last_synced_commit":"bd632059ea0bb5cf444b33bdfb4eba2118300c62"},"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/martinus/robin-hood-hashing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinus%2Frobin-hood-hashing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinus%2Frobin-hood-hashing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinus%2Frobin-hood-hashing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinus%2Frobin-hood-hashing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinus","download_url":"https://codeload.github.com/martinus/robin-hood-hashing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinus%2Frobin-hood-hashing/sbom","scorecard":{"id":622023,"data":{"date":"2025-08-11","repo":{"name":"github.com/martinus/robin-hood-hashing","commit":"7697343363af4cc3f42cab17be49e6af9ab181e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/martinus/robin-hood-hashing/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/martinus/robin-hood-hashing/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/martinus/robin-hood-hashing/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/martinus/robin-hood-hashing/codeql-analysis.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T05:25:22.420Z","repository_id":9748545,"created_at":"2025-08-21T05:25:22.420Z","updated_at":"2025-08-21T05:25:22.420Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277218774,"owners_count":25781445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-27T02:00:08.978Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","container","cpp","cpp11","cpp14","hash","hash-tables","header-only","no-dependencies","single-file","stl-containers","unordered-maps"],"created_at":"2024-08-03T02:01:31.613Z","updated_at":"2025-09-27T10:30:55.147Z","avatar_url":"https://github.com/martinus.png","language":"C++","funding_links":["https://github.com/sponsors/martinus"],"categories":["Containers","C++","Coding","Data Structures and Algorithms","Maths"],"sub_categories":["C++ Data Structures and Algorithms"],"readme":"➵ robin_hood unordered map \u0026 set  [![Release](https://img.shields.io/github/release/martinus/robin-hood-hashing.svg)](https://github.com/martinus/robin-hood-hashing/releases) [![GitHub license](https://img.shields.io/github/license/martinus/robin-hood-hashing.svg)](https://raw.githubusercontent.com/martinus/robin-hood-hashing/master/LICENSE)\n============\n\n------\n\u003e **_NOTE:_**  Unfortunately I do not have time to continue development for this hashmap. I have a worthy successor though, please head over to: [`ankerl::unordered_dense::{map, set}`](https://github.com/martinus/unordered_dense)\n\n\u003e I have spent a lot of time developing and improving it `robin_hood`, and it works quite well for most use cases. I won't make any updates to this code any more, unless they are PRs for critical bug fixes.\n------\n\n[![Travis CI Build Status](https://travis-ci.com/martinus/robin-hood-hashing.svg?branch=master)](https://travis-ci.com/martinus/robin-hood-hashing)\n[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/github/martinus/robin-hood-hashing?branch=master\u0026svg=true)](https://ci.appveyor.com/project/martinus/robin-hood-hashing)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9308495247b542c9802016caa6fd3461)](https://www.codacy.com/app/martinus/robin-hood-hashing?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=martinus/robin-hood-hashing\u0026amp;utm_campaign=Badge_Grade)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/martinus/robin-hood-hashing.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/martinus/robin-hood-hashing/alerts/)\n[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/martinus/robin-hood-hashing.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/martinus/robin-hood-hashing/context:cpp)\n[![Coverage Status](https://coveralls.io/repos/github/martinus/robin-hood-hashing/badge.svg)](https://coveralls.io/github/martinus/robin-hood-hashing)\n\n`robin_hood::unordered_map` and `robin_hood::unordered_set` is a platform independent replacement for `std::unordered_map` / `std::unordered_set` which is both faster and more memory efficient for real-world use cases.\n\n## Installation \u0026 Usage\n\n### Direct Inclusion\n\n1. Add [`robin_hood.h`](https://github.com/martinus/robin-hood-hashing/releases) to your C++ project.\n1. Use `robin_hood::unordered_map` instead of `std::unordered_map`\n1. Use `robin_hood::unordered_set` instead of `std::unordered_set`\n\n### [Conan](https://conan.io/), the C/C++ Package Manager\n\n1. Setup your `CMakeLists.txt` (see [Conan documentation](https://docs.conan.io/en/latest/integrations/build_system.html) on how to use MSBuild, Meson and others) like this:\n   ```CMake\n   project(myproject CXX)\n  \n   add_executable(${PROJECT_NAME} main.cpp)\n  \n   include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) # Include Conan-generated file\n   conan_basic_setup(TARGETS) # Introduce Conan-generated targets\n  \n   target_link_libraries(${PROJECT_NAME} CONAN_PKG::robin-hood-hashing)\n   ```\n1. Create `conanfile.txt` in your source dir (don't forget to update the version)\n   ```ini\n   [requires]\n   robin-hood-hashing/3.11.5\n\n   [generators]\n   cmake\n   ```\n1. Install and run Conan, then build your project as always:\n   ```Bash\n   pip install conan\n   mkdir build\n   cd build\n   conan install ../ --build=missing\n   cmake ../\n   cmake --build .\n   ```\n   The `robin-hood-hashing` package in Conan is kept up to date by Conan contributors. If the version is out of date, please [create an issue or pull request](https://github.com/conan-io/conan-center-index) on the `conan-center-index` repository.\n\n## Benchmarks\n\nPlease see extensive benchmarks at [Hashmaps Benchmarks](https://martin.ankerl.com/2019/04/01/hashmap-benchmarks-01-overview/). In short: `robin_hood` is always among the fastest maps and uses far less memory than `std::unordered_map`.\n\n## Design Choices\n\n- **Two memory layouts**. Data is either stored in a flat array, or with node indirection. Access for `unordered_flat_map` is extremely fast due to no indirection, but references to elements are not stable. It also causes allocation spikes when the map resizes, and will need plenty of memory for large objects. Node based map has stable references \u0026 pointers (NOT iterators! Similar to [std::unordered_map](https://en.cppreference.com/w/cpp/container/unordered_map)) and uses `const Key` in the pair. It is a bit slower due to indirection. The choice is yours; you can either use `robin_hood::unordered_flat_map` or `robin_hood::unordered_node_map` directly. If you use `robin_hood::unordered_map` It tries to choose the layout that seems appropriate for your data.\n\n- **Custom allocator**. Node based representation has a custom bulk allocator that tries to make few memory allocations. All allocated memory is reused, so there won't be any allocation spikes. It's very fast as well.\n\n- **Optimized hash**. `robin_hood::hash` has custom implementations for integer types and for `std::string` that are very fast and falls back to `std::hash` for everything else.\n\n- **Depends on good Hashing**. For a really bad hash the performance will not only degrade like in `std::unordered_map`, the map will simply fail with an `std::overflow_error`. In practice, when using the standard `robin_hood::hash`, I have never seen this happening.\n\n## License\n\nLicensed under the MIT License. See the [LICENSE](https://github.com/martinus/robin-hood-hashing/blob/master/LICENSE) file for details.\n\nby martinus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinus%2Frobin-hood-hashing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinus%2Frobin-hood-hashing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinus%2Frobin-hood-hashing/lists"}