{"id":14155122,"url":"https://github.com/XiangpengHao/congee","last_synced_at":"2025-08-06T00:33:16.460Z","repository":{"id":43029706,"uuid":"444255786","full_name":"XiangpengHao/congee","owner":"XiangpengHao","description":"Concurrent ART (adaptive radix tree)","archived":false,"fork":false,"pushed_at":"2025-06-03T22:36:24.000Z","size":880,"stargazers_count":157,"open_issues_count":10,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-04T03:17:07.073Z","etag":null,"topics":["adaptive-radix-tree","concurrent","containers","database","high-performance","index","range-index","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/XiangpengHao.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,"zenodo":null}},"created_at":"2022-01-04T02:03:11.000Z","updated_at":"2025-07-15T19:54:24.000Z","dependencies_parsed_at":"2023-10-11T12:12:15.615Z","dependency_job_id":"2583c5cf-efb1-416b-b976-a4d4e634b2d6","html_url":"https://github.com/XiangpengHao/congee","commit_stats":{"total_commits":298,"total_committers":5,"mean_commits":59.6,"dds":"0.15771812080536918","last_synced_commit":"c1685532902a69781213b64fcec281dc161b56d0"},"previous_names":["xiangpenghao/con-art-rust"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/XiangpengHao/congee","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiangpengHao%2Fcongee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiangpengHao%2Fcongee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiangpengHao%2Fcongee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiangpengHao%2Fcongee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XiangpengHao","download_url":"https://codeload.github.com/XiangpengHao/congee/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XiangpengHao%2Fcongee/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268964256,"owners_count":24336726,"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-08-05T02:00:12.334Z","response_time":2576,"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":["adaptive-radix-tree","concurrent","containers","database","high-performance","index","range-index","rust"],"created_at":"2024-08-17T08:02:07.761Z","updated_at":"2025-08-06T00:33:16.448Z","avatar_url":"https://github.com/XiangpengHao.png","language":"Rust","funding_links":[],"categories":["rust","Rust"],"sub_categories":[],"readme":"# Congee \n[![congee](https://github.com/XiangpengHao/congee/actions/workflows/ci.yml/badge.svg)](https://github.com/XiangpengHao/congee/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/congee.svg)](\nhttps://crates.io/crates/congee)\n[![dependency status](https://deps.rs/repo/github/xiangpenghao/congee/status.svg)](https://deps.rs/crate/congee)\n[![codecov](https://codecov.io/gh/XiangpengHao/congee/branch/main/graph/badge.svg?token=x0PSjQrqyR)](https://codecov.io/gh/XiangpengHao/congee)\n[![Documentation](https://docs.rs/congee/badge.svg)](https://docs.rs/congee)\n\nA Rust implementation of ART-OLC [concurrent adaptive radix tree](https://db.in.tum.de/~leis/papers/artsync.pdf).\nIt implements the optimistic lock coupling with proper SIMD support.\n\nIt only supports (and is optimized for) fixed sized 8 byte key;\ndue to this specialization, congee has great performance -- basic operations are faster than most hash tables, range scan is an order of magnitude faster.\n\nThe codebase is extensively tested with [{address|leak} sanitizer](https://doc.rust-lang.org/beta/unstable-book/compiler-flags/sanitizer.html) as well as [libfuzzer](https://llvm.org/docs/LibFuzzer.html).\nCongee's performance is continuously tracked [here](https://xiangpenghao.github.io/congee/dev/bench/). \n\n### Why Congee?\n- Fast performance, faster than most hash tables.\n- Concurrent, super scalable, it reaches 150Mop/s on 32 cores.\n- Super low memory consumption. Hash tables often have exponential bucket size growth, which often lead to low load factors. ART is more space efficient.\n\n\n### Why not Congee?\n- Not for arbitrary key size. This library only supports 8 byte key.\n\n\n### Design principles\nCongee aims to be a simple and reliable **primitive** for building database systems.\n\n\n### Example with Congee:\n```rust\nuse congee::Congee;\nuse std::sync::Arc;\n\nlet art = Congee::new();\nlet guard = art.pin(); // enter an epoch\n\nlet value = Arc::new(String::from(\"hello\"));\nart.insert(1, value.clone(), \u0026guard).unwrap();\n\nlet retrieved = art.get(1, \u0026guard).unwrap();\nassert_eq!(retrieved.as_ref(), \"hello\");\n\n// Update \nart.compute_if_present(\n    1, \n    |current| Some(Arc::new(format!(\"{} world\", current))), \n    \u0026guard\n);\nlet updated = art.get(1, \u0026guard).unwrap();\nassert_eq!(updated.as_ref(), \"hello world\");\n\nlet removed = art.remove(1, \u0026guard).unwrap();\nassert_eq!(removed.as_ref(), \"hello world\");\n```\n\n### Example with raw Congee (u64 key and value):\n```rust\nuse congee::CongeeRaw;\nlet art = CongeeRaw::default();\nlet guard = art.pin(); // enter an epoch\n\nart.insert(0, 42, \u0026guard); // insert a value\nlet val = art.get(\u00260, \u0026guard).unwrap(); // read the value\nassert_eq!(val, 42);\n\nlet mut scan_buffer = vec![(0, 0); 8];\nlet scan_result = art.range(\u00260, \u002610, \u0026mut scan_buffer, \u0026guard); // scan values\nassert_eq!(scan_result, 1);\nassert_eq!(scan_buffer[0], (0, 42));\n```\n\n### Performance\nBenchmarked with the [`conc-map-bench`](https://github.com/xacrimon/conc-map-bench)\n\n![Exchange](/doc/exchange.jpg)\n![Rapid grow](/doc/rapid-grow.jpg)\n![read-heavy](/doc/read-heavy.jpg)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiangpengHao%2Fcongee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXiangpengHao%2Fcongee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXiangpengHao%2Fcongee/lists"}