{"id":34280219,"url":"https://github.com/graetz23/hashcc","last_synced_at":"2026-03-12T07:02:19.662Z","repository":{"id":25287414,"uuid":"28713338","full_name":"graetz23/hashcc","owner":"graetz23","description":"A hash map implementation based on templated C++","archived":false,"fork":false,"pushed_at":"2026-03-02T19:48:00.000Z","size":429,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-02T20:49:16.781Z","etag":null,"topics":["data-structure","data-structures","data-structures-algorithms","generic","hashing","hashmap","object-oriented","template","trie","tries"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graetz23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-01-02T12:59:04.000Z","updated_at":"2026-03-02T19:48:03.000Z","dependencies_parsed_at":"2025-10-19T16:18:56.809Z","dependency_job_id":"9c048e62-5641-462d-933c-818df5ff7566","html_url":"https://github.com/graetz23/hashcc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graetz23/hashcc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2Fhashcc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2Fhashcc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2Fhashcc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2Fhashcc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graetz23","download_url":"https://codeload.github.com/graetz23/hashcc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graetz23%2Fhashcc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30417685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T06:40:58.731Z","status":"ssl_error","status_checked_at":"2026-03-12T06:40:40.296Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data-structure","data-structures","data-structures-algorithms","generic","hashing","hashmap","object-oriented","template","trie","tries"],"created_at":"2025-12-16T22:56:22.070Z","updated_at":"2026-03-12T07:02:19.656Z","avatar_url":"https://github.com/graetz23.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HASHCC - Template-based C++ Hash Map Library\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## Overview\n\n**HASHCC** is an object-oriented C++ hash map library based on C++ templates. It implements a [trie-like hash tree](https://en.wikipedia.org/wiki/Trie) data structure, providing efficient key-value storage with customizable hash functions.\n\nWhen you push a key/object tuple into the HashMap, it builds a tree structure where:\n- **Depth** equals the length of the hash\n- **Width** equals the variety of hash symbols\n\nThe library supports multiple hash functions:\n- **FNV** (Fowler-Noll-Vo) - 24-character decimal hash\n- **Adler** - 24-character decimal hash\n- **ELF** - 10-character decimal hash\n\nThis creates a massive address space (e.g., 24^10 = possible combinations) for storing objects with minimal collisions.\n\n## Features\n\n- Template-based generic key-value storage\n- Multiple hash functions (FNV, Adler, ELF)\n- Support for various key types: String, Int16, Int32, Int64, uInt16, uInt32, uInt64\n- Trie-like internal tree structure for efficient storage\n- Comprehensive unit tests with [Catch2](https://github.com/catchorg/Catch2)\n- Performance benchmarking capabilities\n- MIT Licensed\n\n## Prerequisites\n\n- CMake 3.10+\n- Ninja build system\n- C++11 compatible compiler (GCC, Clang, MSVC)\n\n## Building\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/graetz23/hashcc.git\ncd hashcc\n```\n\n### Configure and Build\n\n```bash\nmkdir -p build\ncd build\ncmake -G Ninja ..\nninja\n```\n\nThis will create two executables:\n- `./build/hashcc` - Main application\n- `./build/hashcc-test` - Unit and performance tests\n\n## Running Tests\n\n### All Tests (Unit + Performance)\n\n```bash\n./build/hashcc-test\n```\n\n### Unit Tests Only\n\n```bash\n./build/hashcc-test \"~[perf]\"\n```\n\n### Performance Tests Only\n\n```bash\n./build/hashcc-test \"[perf]\"\n```\n\n## Benchmark Results\n\nTests were run on the following workstation:\n\n| Component | Specification |\n|-----------|---------------|\n| **CPU** | Intel Xeon E5-2680 v4 @ 2.40GHz |\n| **Cores** | 14 cores / 28 threads |\n| **RAM** | 62 GB |\n| **OS** | Linux |\n\n### Unit Test Results\n\n```\nAll tests passed (1,000,170 assertions in 36 test cases)\n```\n\n### Performance Benchmarks\n\n| Operation | Entries | Time (ms) |\n|-----------|---------|-----------|\n| **Insert** | 1,000,000 | ~3,400 ms |\n| **Insert** | 2,000,000 | ~6,300 ms |\n| **Insert** | 4,000,000 | ~13,000 ms |\n| **Insert** | 8,000,000 | ~27,000 ms |\n| **Retrieve** | 1,000,000 | ~2,800 ms |\n| **Retrieve** | 2,000,000 | ~5,900 ms |\n| **Retrieve** | 4,000,000 | ~12,000 ms |\n| **Retrieve** | 8,000,000 | ~25,000 ms |\n\n*Note: Performance results may vary based on hardware and system load.*\n\n## Usage Example\n\n```cpp\n#include \"hashcc/hashcc.h\"\n\nusing namespace HASHCC;\n\nint main() {\n    // Create a HashMap with FNV hash\n    OBJ::HashMapBuilder builder;\n    OBJ::HashMap\u003cInt32, String\u003e* map = builder.create\u003cInt32, String\u003e(OBJ::Type::Dec24Fnv);\n\n    // Put values\n    map-\u003eput(1, \"first\");\n    map-\u003eput(2, \"second\");\n\n    // Get values\n    String value = map-\u003eget(1);  // returns \"first\"\n\n    delete map;\n    return 0;\n}\n```\n\n## Author\n\n**Christian** (graetz23@gmail.com)\n\n## License\n\nHASHCC is distributed under the MIT License. See the [LICENSE](LICENSE) file for full details.\n\n---\n\n**Copyright (c) 2008-2026 Christian (graetz23@gmail.com)**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraetz23%2Fhashcc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraetz23%2Fhashcc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraetz23%2Fhashcc/lists"}