{"id":22534947,"url":"https://github.com/mhhollomon/bplustree","last_synced_at":"2025-08-02T03:10:30.777Z","repository":{"id":266847763,"uuid":"899284406","full_name":"mhhollomon/bplustree","owner":"mhhollomon","description":"B+ Tree implementation","archived":false,"fork":false,"pushed_at":"2024-12-14T20:55:58.000Z","size":145,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T06:15:16.896Z","etag":null,"topics":["btrees","cplusplus","cpp20"],"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/mhhollomon.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-12-06T00:42:41.000Z","updated_at":"2024-12-14T00:00:52.000Z","dependencies_parsed_at":"2024-12-06T14:37:42.523Z","dependency_job_id":"d30e4e73-1e1b-4337-9056-d689c5495a48","html_url":"https://github.com/mhhollomon/bplustree","commit_stats":null,"previous_names":["mhhollomon/bplustree"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mhhollomon/bplustree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhhollomon%2Fbplustree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhhollomon%2Fbplustree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhhollomon%2Fbplustree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhhollomon%2Fbplustree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhhollomon","download_url":"https://codeload.github.com/mhhollomon/bplustree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhhollomon%2Fbplustree/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268330915,"owners_count":24233152,"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-02T02:00:12.353Z","response_time":74,"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":["btrees","cplusplus","cpp20"],"created_at":"2024-12-07T10:05:59.733Z","updated_at":"2025-08-02T03:10:30.696Z","avatar_url":"https://github.com/mhhollomon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bplustree\n\nImplementation of a B+ Tree.\n\nThis works best with a large number of records and a large fan-out.\n\nRequires C++20.\n\nMIT license.\n\n**Note** `main` branch is usually a work in progress. You will be much\nbetter served using the latest release.\n\n## Benchmark\n\nThe benchmark code in `examples/set-benchmark.cpp` was run and the following\nresults were obtained as an average of 5 runs.\n\n\n|Structure        |build   |probe   |\n|-----------------|--------|--------|\n|std::set\\\u003cint\u003e   |967ms|608ms|\n|std::map\u003cint,int\u003e|956ms|587ms|\n|BPT::set\\\u003cint\u003e   |725ms|272ms|\n|BPT::BPlusTree\u003cint, int\u003e|701ms|272ms|\n|BPT::BPlusTree\u003cint, int, 100\u003e|764ms|210ms|\n\n## Concurrency\n\nThis is not concurrency safe without additional locking.\nThe tree methods can be called without problems from different threads. However,\ntwo threads may not call methods at the same time - unless they are both reads.\n\nCaveat Scriptor\n\n## Interface\n\nSee [B+ API](docs/api.md)\n\n## Set\nA replacement for `std::set` is available.\n\nC.f. [Set documentation](docs/set.md)\n\n## Using in a project\n\n### Direct copy\n\nThis is a header only project. All that would be needed is to copy the contents\nof the `src` directory along with its subdirectories to some suitable place\nand point your compiler there as an include  directory.\n\n### using CMake and CPM\n\nAn easier way, if you use cmake, is to use [CPM](https://github.com/cpm-cmake/CPM.cmake).\n\nSomething like the following :\n\n```cmake\ninclude(CPM)\n\n...\n\nCPMAddPackage(\"gh:mhhollomon/bplustree@0.2.0\")\n\ntarget_link_libraries(my_project PRIVATE bplustree)\n```\nYou can control the creation of the tests by setting\n`BPLUSTREE_BUILD_TESTS`. it is on by default.\n\n## TO DO\n \n### Removing elements\n\nThere will be a `rebuild` method that will take care of reclaiming space.\n\n### Concurency\n\nUse Optimistic Lock Coupling to allow concurrency.\n\n(c.f. http://sites.computer.org/debull/A19mar/p73.pdf)\n\n### std::map interface\nThis will probably be a new separate class that uses BPlusTree internally.\n\nI don't plan to support all the really gnarly bits about hinting and node_ptrs.\n\n### std::multimap interface\n\nSimilar to above.\n\n### Optimizing\n- work on the splitting algorithm. It still does more data copies/moves than really necessary.\n\n### Iterators\n\nProvide reverse iterators.\n\n## Technology\n- [Catch2](https://github.com/catchorg/Catch2) for testing framework.\n- [CPM](https://github.com/cpm-cmake/CPM.cmake) for managing dependencies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhhollomon%2Fbplustree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhhollomon%2Fbplustree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhhollomon%2Fbplustree/lists"}