Extract the 32-bit non-SSE2 select_bit implementation from
BitVector::select0 and select1.
This makes the code more regular, as 32-bit SSE2 and non-SSE2
can now be handled without an ifdef in select0/1.
Having this function will also make #28 cleaner.
I benchmarked select0 and select1 with this commit on x86_64 with
MARISA_WORD_SIZE defined to 32, and there is no measurable difference.
This is not surprising, as unit_hi and unit_lo are in the same cache line.
Extract the 32-bit non-SSE2 select_bit implementation from
BitVector::select0
andselect1
.This makes the code more regular, as 32-bit SSE2 and non-SSE2 can now be handled without an
ifdef
inselect0/1
.Having this function will also make #28 cleaner.
I benchmarked
select0
andselect1
with this commit on x86_64 withMARISA_WORD_SIZE
defined to 32, and there is no measurable difference. This is not surprising, as unit_hi and unit_lo are in the same cache line.