hpcc-systems/HPCC-Platform — pull request #6721 by jakesmith (2014-12-03 13:47:33+00:00)
Title: HPCC-12662 Thread unsafe version of IBiset

Introduce a thread unsafe versio of IBitSet.
The pre-existing version protects against any concurrent access
to set/gets for any bit by any thread.
It also uses a flexible/expanding Array for storage.

Introduce a new version optimized for speed, that does not
expand, and requiest a fixed lump of memory to be provided, big
enough for the bit set that it will be used for.
Concurrent access is safe as long as access to the
same underlying bits_t space is not set/get by multiple threads.
The particular use case it was introduced for, is the CMarker in
lookup join. Using this implementation without locks, allows the
CMarker to sometimes run 100x's of times faster.

This change also fixes a bug in the pre-existing IBitset
implementation, in IBiset->incl(). If the include range started
beyond the existing width of the bit set, the implementation
incorrectly added set range values to the tail of the bitset,
as opposed to pre-padding the bitset up to the start point.

Signed-off-by: Jake Smith