Hello everyone. I'm using BigInteger quite a lot these days and storing / retrieving from a memoryblock. (Bits up to 500,000 with only a few set). I've noticed i'm spending a lot of time in clearBit when loadFromMemoryBlock is called.
I've had a quick look and loadFromMemoryBlock calls setBitRangeAsInt, which calls setBit -> ensureSize(as needed) and then clearBit.
It seems ensureSize clears the bits for anything newly re-allocated so clearbit is just wasting cycles.
I'm hoping you can re-work the functions and speed up loadFromMemoryBlock?