{"id":21036695,"url":"https://github.com/maksasj/pouch","last_synced_at":"2025-05-15T14:31:59.544Z","repository":{"id":162187954,"uuid":"615850512","full_name":"Maksasj/pouch","owner":"Maksasj","description":"Pouch - simple c++ library that introduces some containers, primary HashMap and stack style dynamic array.","archived":true,"fork":false,"pushed_at":"2023-06-18T13:25:57.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T20:30:05.573Z","etag":null,"topics":["cpp","educational-project","library","stl"],"latest_commit_sha":null,"homepage":"","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/Maksasj.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}},"created_at":"2023-03-18T21:23:25.000Z","updated_at":"2024-09-14T09:42:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ac646a3-c3b3-4b37-a6f7-a142cd4904f6","html_url":"https://github.com/Maksasj/pouch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Fpouch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Fpouch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Fpouch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Fpouch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maksasj","download_url":"https://codeload.github.com/Maksasj/pouch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254358853,"owners_count":22057999,"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","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":["cpp","educational-project","library","stl"],"created_at":"2024-11-19T13:21:38.894Z","updated_at":"2025-05-15T14:31:59.523Z","avatar_url":"https://github.com/Maksasj.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pouch\r\n\r\nPouch - simple c++ library that introduces some containers, primary HashMap and stack style dynamic array. \r\n\r\nHashMap uses classical approach with array of linked lists, but there is also used rehashing technique to gain performance **(note that FrostWeaveBag, have almost O(n*2) space complexity)**.\r\n\r\nOn the another hand there is HoleyPouch that works similary with C++ **std::vector**, and it have two implementations one aimed for speed, HoleyPouch (space complexity O(n*2)), as well as HoleyPouchCompact which main idea is a best space complexity O(n). \r\n\r\n\u003e Note: This repository is not actively maintained, repository where made only for educational purposes.\r\n\r\n## Building\r\n### Requirments\r\n- Cmake (probably any version)\r\n- Any c++ compiler, but clang is preferable.\r\n\r\n```bash\r\ncmake -B build -G Ninja\r\n\r\ncmake --build build\r\n```\r\n\r\nBut for convenience there is bash `make` script\r\n```bash\r\nmake.bat\r\n```\r\n\r\n## Performace\r\n\r\n### Associative arrays\r\n\u003e Tested with 100k elements.\r\n\u003cdetails\u003e\r\n  \u003csummary\u003eResults\u003c/summary\u003e\r\n\r\n    pouch::FrostWeaveBag\u003cint, int\u003e: \r\n        Insertion time for: 100000, took: 21.64[ms]\r\n        Load factor: 0.976562 / 0.99\r\n        Get time for: 100000, took: 14.3355[ms]\r\n        Erase time for: 100000, took: 15.4833[ms]\r\n\r\n    C++ std::unordered_map\u003cint, int\u003e: \r\n        Insertion time for: 100000, took: 47.673[ms]\r\n        Load factor: 0.762939 / 1\r\n        Get time for: 100000, took: 18.2804[ms]\r\n        Erase time for: 100000, took: 33.5546[ms]\r\n\r\n    C++ std::map\u003cint, int\u003e: \r\n        Insertion time for: 100000, took: 66.4885[ms]\r\n        Get time for: 100000, took: 67.8043[ms]\r\n        Erase time for: 100000, took: 84.75[ms]\r\n\u003c/details\u003e\r\n\r\n### Dynamic arrays\r\n\u003e Tested with 1m elements.\r\n\u003cdetails\u003e\r\n  \u003csummary\u003eResults\u003c/summary\u003e\r\n\r\npouch::HoleyPouch\u003cint\u003e\r\n    Push back took: 6.0982[ms]\r\n    Get at took: 2.2146[ms]\r\n    Pop back took: 5.9695[ms]\r\n\r\npouch::HoleyPouchCompact\u003cint\u003e\r\n    Push back took: 13171.5[ms]\r\n    Get at took: 2.4255[ms]\r\n    Pop back took: 12300.6[ms]\r\n\r\nstd::vector\u003cint\u003e\r\n    Push back took: 23.9014[ms]\r\n    Get at took: 2.6605[ms]\r\n    Pop back took: 18.2546[ms]\r\n\r\nstd::deque\u003cint\u003e\r\n    Push back took: 75.5544[ms]\r\n    Get at took: 102.663[ms]\r\n    Pop back took: 39.1867[ms]\r\n\r\nstd::list\u003cint\u003e\r\n    Push back took: 152.267[ms]\r\n    Pop back took: 128.308[ms]\r\n\u003c/details\u003e\r\n\r\n## Testing\r\nFor testing this project is using Ctest framework, so probably you need to install cmake :), and as well as with benchmark and building ther is a simple bash scipt, used for building and running ctests.\r\n```bash\r\ntest.bat\r\n```\r\n\r\n## Benchmark\r\nThere is a `bench.bat` scipt that can be used to compile benchmark test as well as run them. \r\n```bash\r\nbench.bat\r\n```\r\n\r\n## License\r\nGraph is free, open source library. All code in this repository is licensed under\r\n- MIT License ([LICENSE.md](https://github.com/Maksasj/pouch/blob/master/LICENSE.md) or https://opensource.org/license/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksasj%2Fpouch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaksasj%2Fpouch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksasj%2Fpouch/lists"}