Skip to content

0.2.0+ Plans #17

Description

@Capital-Asterisk
  • 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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions