{"id":18307321,"url":"https://github.com/ross96d/zart","last_synced_at":"2025-04-09T11:21:04.572Z","repository":{"id":261138978,"uuid":"883387604","full_name":"ross96D/zart","owner":"ross96D","description":"Implementation of the adaptive radix tree","archived":false,"fork":false,"pushed_at":"2025-03-08T16:51:47.000Z","size":2869,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-08T17:29:58.832Z","etag":null,"topics":["radix-tree","tree","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/ross96D.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-11-04T21:56:25.000Z","updated_at":"2025-03-08T16:51:51.000Z","dependencies_parsed_at":"2024-11-04T23:17:20.710Z","dependency_job_id":"e81a43d6-50c4-4abe-a6e6-c2fe7c2a6253","html_url":"https://github.com/ross96D/zart","commit_stats":null,"previous_names":["ross96d/zart"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross96D%2Fzart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross96D%2Fzart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross96D%2Fzart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ross96D%2Fzart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ross96D","download_url":"https://codeload.github.com/ross96D/zart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027799,"owners_count":21035668,"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":["radix-tree","tree","zig"],"created_at":"2024-11-05T16:03:52.015Z","updated_at":"2025-04-09T11:21:04.549Z","avatar_url":"https://github.com/ross96D.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Summary\n\nThis repository is an implementation of the adaptive radix tree described on [The adaptive radix tree: ARTful indexing for main-memory databases](https://ieeexplore.ieee.org/document/6544812). \n\n# TODO\n- [ ] Add fuzzy test\n- [ ] Implement a memory pool strategy for fast node allocation/deallocation. Make it configurable at build time.\n- [x] Node size is to large (64 bytes), Node3 take a 32 bytes, have an almost always null pointer to Leaf. Partial is 16 bytes, ideally Node size should be 24 bytes. This reduce memory consumption and may improve speed as more nodes can fit on the cache layer.\n\n# Benchmark results against std.StringHashMap\n\nThis adaptative radix implementation copys the part of the key necessary to not depend on the passed key so is not equivalent to StringHashMap on this aspect, which give StringHashMap a huge advantage. But either way this is a perspective on how fast/slow and memory efficient the implementation is.\n\n#### v1\n```\nStringHashMap\n\nStringHashMap memory\nVmData:    23740 kB\nVmStk:       136 kB\nVmExe:       216 kB\nVmLib:         8 kB\nVmPTE:       100 kB\nVmSwap:        0 kB\n\ninsert 18ms, search 5ms, delete 5ms combined 29ms\n\nStringHashMap allocator stats allocations: 17 deallocations: 16 allocated_bytes: 26214608 freed_bytes: 13107384\n\n\nAdaptative radix tree\n\nAdaptative radix tree memory\nVmData:    75788 kB\nVmStk:       136 kB\nVmExe:       216 kB\nVmLib:         8 kB\nVmPTE:       212 kB\nVmSwap:        0 kB\n\ninsert 41ms, search 18ms, delete 43ms combined 103ms\n\nAdaptative radix tree allocator stats allocations: 573197 deallocations: 259093 allocated_bytes: 29079664 freed_bytes: 7181976\n```\n\n#### v2 pool allocator for Node\n```\nArtAdaptative radix tree\n\nAdaptative radix tree memory\nVmData:    52004 kB\nVmStk:       136 kB\nVmExe:       228 kB\nVmLib:         8 kB\nVmPTE:       172 kB\nVmSwap:        0 kB\n\navg: 7.325801446461426 max: 18 min: 1\n\ninsert 45ms, search 18ms, delete 55ms combined 119ms\n\nAdaptative radix tree allocator stats allocations: 254717 deallocations: 236440 allocated_bytes: 25398584 freed_bytes: 5744936\n```\n\n#### v3 pool allocator for Node and Leaf\n```\nAdaptative radix tree\n\nAdaptative radix tree memory\nVmData:    42764 kB\nVmStk:       136 kB\nVmExe:       224 kB\nVmLib:         8 kB\nVmPTE:       136 kB\nVmSwap:        0 kB\n\navg: 7.325801446461426 max: 18 min: 1\n\ninsert 36ms, search 18ms, delete 30ms combined 85ms\n\nAdaptative radix tree allocator stats allocations: 19531 deallocations: 1252 allocated_bytes: 31314464 freed_bytes: 11659912\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fross96d%2Fzart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fross96d%2Fzart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fross96d%2Fzart/lists"}