I'd like to use TypeSortedCollection as a set (order does not matter at all), in high-performance code, and the cost of allocating/maintaining the vectors for the indices is bumming me out, since I have no use for it. I can't think of a perfect clean solution, but perhaps indices could be an empty tuple if preserve_order is false? That would require a lot of special-casing though... Do you feel like this is out of scope for this package?
In particular, I'd like to support filter!. but it looks mighty hairy to maintain the indices efficiently.
I'd like to use TypeSortedCollection as a set (order does not matter at all), in high-performance code, and the cost of allocating/maintaining the vectors for the indices is bumming me out, since I have no use for it. I can't think of a perfect clean solution, but perhaps
indicescould be an empty tuple if preserve_order is false? That would require a lot of special-casing though... Do you feel like this is out of scope for this package?In particular, I'd like to support
filter!. but it looks mighty hairy to maintain the indices efficiently.