{"id":15031591,"url":"https://github.com/tickbh/rbtree-rs","last_synced_at":"2025-04-12T22:55:17.904Z","repository":{"id":25892740,"uuid":"106817678","full_name":"tickbh/rbtree-rs","owner":"tickbh","description":"The rbtree for Rust","archived":false,"fork":false,"pushed_at":"2024-01-22T05:55:19.000Z","size":25,"stargazers_count":57,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T22:55:12.090Z","etag":null,"topics":["rbtree","rust","rust-collections","rustlang"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tickbh.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-10-13T11:46:36.000Z","updated_at":"2025-03-24T05:59:04.000Z","dependencies_parsed_at":"2024-09-24T20:16:09.014Z","dependency_job_id":null,"html_url":"https://github.com/tickbh/rbtree-rs","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.05882352941176472,"last_synced_commit":"b3c237cf9ee4d331c3c942b53a1acd20ddc0ce26"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickbh%2Frbtree-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickbh%2Frbtree-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickbh%2Frbtree-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tickbh%2Frbtree-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tickbh","download_url":"https://codeload.github.com/tickbh/rbtree-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643050,"owners_count":21138353,"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":["rbtree","rust","rust-collections","rustlang"],"created_at":"2024-09-24T20:16:07.449Z","updated_at":"2025-04-12T22:55:17.885Z","avatar_url":"https://github.com/tickbh.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"rbtree for rust\n=====================\n\n[![Build Status](https://travis-ci.org/tickbh/rbtree-rs.svg?branch=master)](https://travis-ci.org/tickbh/rbtree-rs) [![Crates.io](https://img.shields.io/crates/v/rbtree.svg)](https://crates.io/crates/rbtree)\n\nA Rust library for creating red-black trees. \n\n## Usage\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nrbtree = \"0.1\"\n```\n\nand this to your crate root:\n\n```rust\nextern crate rbtree;\n```\n\nHow to use\n```rust\nuse rbtree::RBTree;\nlet mut m = RBTree::new();\nassert_eq!(m.len(), 0);\nm.insert(1, 2);\nassert_eq!(m.len(), 1);\nm.insert(2, 4);\nassert_eq!(m.len(), 2);\nassert_eq!(*m.get(\u00261).unwrap(), 2);\nassert_eq!(*m.get(\u00262).unwrap(), 4);\n```\n\n## Bench\nbench code in ./examples/bench.rs, you can run command, in cpu i7-6700HQ, 2.60GHz\n```txt\ncargo run --release --example bench\n```\n```txt\n-----------All Test Repeat: 10, All Tree Num: 1000-------------------\nInsert Test,           Max Cost: 124us, Min Cost: 101us, Aver Cost: 106us\nGet data by key=20,    Max Cost: 395ns, Min Cost: 0ns, Aver Cost: 39ns\nRemove data by key=20, Max Cost: 790ns, Min Cost: 0ns, Aver Cost: 276ns\n-----------End Tree Test----------------------------------------------\n\n-----------All Test Repeat: 10, All Tree Num: 10000-------------------\nInsert Test,           Max Cost: 2255us, Min Cost: 1383us, Aver Cost: 1590us\nGet data by key=20,    Max Cost: 1975ns, Min Cost: 0ns, Aver Cost: 592ns\nRemove data by key=20, Max Cost: 2765ns, Min Cost: 395ns, Aver Cost: 829ns\n-----------End Tree Test----------------------------------------------\n\n-----------All Test Repeat: 10, All Tree Num: 100000-------------------\nInsert Test,           Max Cost: 21583us, Min Cost: 18904us, Aver Cost: 19859us\nGet data by key=20,    Max Cost: 16987ns, Min Cost: 1185ns, Aver Cost: 2883ns\nRemove data by key=20, Max Cost: 2370ns, Min Cost: 1185ns, Aver Cost: 1817ns\n-----------End Tree Test----------------------------------------------\n\n-----------All Test Repeat: 10, All Tree Num: 1000000-------------------\nInsert Test,           Max Cost: 273758us, Min Cost: 249229us, Aver Cost: 257955us\nGet data by key=20,    Max Cost: 4345ns, Min Cost: 1580ns, Aver Cost: 2409ns\nRemove data by key=20, Max Cost: 7506ns, Min Cost: 1975ns, Aver Cost: 2923ns\n-----------End Tree Test----------------------------------------------\n\n-----------All Test Repeat: 10, All Tree Num: 10000000-------------------\nInsert Test,           Max Cost: 3345163us, Min Cost: 3118450us, Aver Cost: 3221181us\nGet data by key=20,    Max Cost: 11456ns, Min Cost: 2370ns, Aver Cost: 3831ns\nRemove data by key=20, Max Cost: 9086ns, Min Cost: 2370ns, Aver Cost: 3594ns\n-----------End Tree Test----------------------------------------------\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftickbh%2Frbtree-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftickbh%2Frbtree-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftickbh%2Frbtree-rs/lists"}