On Apr 22, 2016, at 1:33 PM, Christian Schmitz <[email protected]> wrote: > > if you query the same bitset a lot, you could check all bits once and fill a > boolean array.
The use case is scanning a 128 bit IPv6 address left to right one bit at a time to traverse a B-tree data structure to look up the IP location info of that subnet. (The MaxMind IP location database is a giant B-tree) For a 32 bit IPv4 address I’ve just been testing the Sign of a 32 bit integer and then shifting it left to access each subsequent bit. But for the upgrade to IPv6 support I thought I’d try to find a way to test each bit in place. So it’s just one sequential scan of the bits left to right…. no repetitive testing on the same bits… Thanks, Joe _______________________________________________ Mbsplugins_monkeybreadsoftware.info mailing list [email protected] https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
