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

0.2.0+ Plans #17

Open
Capital-Asterisk opened this issue May 4, 2024 · 0 comments
Open

0.2.0+ Plans #17

Capital-Asterisk opened this issue May 4, 2024 · 0 comments

Comments

@Capital-Asterisk
Copy link
Owner

  • Add KeyedVec, and Global ID Registry copied from osp-magnum

More Bit stuff

  • Add a BitVector (DON'T COPY THE OSP-MAGNUM ONE)
  • Maybe add an interface that behaves more like std::set?

Different types of BitView and BitVector:

  • Regular - Plain bit array
  • Bookmarked - Saves position of the first known 1 bit and/or the first 0 bit, speeding up finding the first value when iterating .ones() or .zeros()
  • Hierarchical - see Optimize HierarchicalBitset #3 , only really need like 1..3 hierarchy levels. each hierarchy level can indicate whether any of the 256+ bits below it is 1, instead of just 2 bits in the current shitty HierarchicalBitset one.

Refcount improvements

Current one is ugly.

  • void ref_release(Owner_t&&) - doesn't return any info about the current ref count

Don't just return a bool or int. Return a struct with a bool reachedZero and maybe a current ref count. Makes it obvious that the condition is that if the ref count reaches zero:

if (refcount.release(std::move(id)).reachedZero)
{
    // Kill the instance for real
}
@Capital-Asterisk Capital-Asterisk changed the title 0.1.3+ Plans 0.2.0+ Plans May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant