Hello, I need some advices. I've worked on fixedbooleanarray and resizablebooleanarray.
From #40066 it is said that both need to be rewritten.
So I've cleaned up fixedbooleanarray that should be a lot cleaner, somewhat faster and more understandable, and I've added some tests. But of course because resizablebooleanarray extends it, it breaks its current implementation. In parallel, I've checked the #39063 bug that states that ResizableBooleanArray uses 64 bytes per bit of information. I've found the reason why (just a silly #define bug), but nonetheless the implementation is deficient. For example pmc1 = new ResizableBooleanArray pmc1 = 1 pmc1 = 2 pmc1 = 3 makes the following allocation calls: # mem_sys_allocate_zeroed(64) ==> (pmc=1, preallocation of 64 bytes, ok) # mem_sys_realloc(64) ==> (pmc=2)we have 63 bytes left, and we realloc ?? # mem_sys_realloc(64) ==> (pmc=3) same problem So in my opinion too this pmc should be rewritten. I'm ready to do it, based on my fixedbooleanarray implementation, but before doing it I need some answers : Whare the requirements/constraints of a ResizableBooleanArray ? e.g are unshift to be less frequent that shift ? What's a typical usage test case ? Should I keep the actual implementation concept : allocating by chunks of 64 bytes ? Waiting for your input... Karl Forner