Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: A fully featured btree implementation #3126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wyhaines
Copy link
Contributor

This is a fully featured btree implementation. A friend gave me some incomplete (and broken) btree code for Go, and when I started reworking it, I discovered that it was a broken semi-copy of an old version of Google's btree for Go.

I finished reworking it so that it adhere's to that original Google version's API, though there are some differences internally in places, and I think that my version is much easier to follow and to understand.

This implementation is quite a bit faster than the AVL tree. I will add links to some benchmarks that I did in a comment. This implementation supports copy-on-write for the trees, for inexpensively creating copies of a tree that are effectively isolated from each other with respect to changes that happen after the fork.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Nov 14, 2024
@n0izn0iz
Copy link
Contributor

Thanks! I need this for that https://github.com/TERITORI/teritori-dapp/blob/2a5c8390438e6aad332f71410bcf8aabaaecab4b/gno/p/havl/havl.gno#L18
:D

@wyhaines wyhaines changed the title A a full features btree implementation A fully featured btree implementation Nov 15, 2024
@wyhaines wyhaines changed the title A fully featured btree implementation feat: A fully featured btree implementation Nov 15, 2024
@salmad3 salmad3 mentioned this pull request Nov 17, 2024
21 tasks
@Kouteki Kouteki added this to the 🚀 Mainnet launch milestone Nov 17, 2024
@Kouteki Kouteki added the in focus Core team is prioritizing this work label Nov 17, 2024
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.79%. Comparing base (bd1d76e) to head (83a406e).
Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3126   +/-   ##
=======================================
  Coverage   63.79%   63.79%           
=======================================
  Files         549      549           
  Lines       78819    78819           
=======================================
  Hits        50279    50279           
  Misses      25150    25150           
  Partials     3390     3390           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in focus Core team is prioritizing this work 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants