Closed scotow closed 6 months ago
I think we could add a counter variable. But this variable would need to be updated properly. Functions like remove_children
must be handled with care. I am looking into that. I agree that it would be very useful!
Closing this issue now, as #7 was merged.
Thanks!
It would be nice to have a O(1) method to get the number of elements in the Map/Set the same way it is done in the std for
HashMap
andHashSet
.It's possible to get it in O(n) using
iter().count()
but could be costly if needed frequently on large Map/Set.