Skip to content

Conversation

@jmr
Copy link
Contributor

@jmr jmr commented Jun 3, 2020

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 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 PR28 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.
@s-yata s-yata self-assigned this Jun 15, 2020
@s-yata s-yata merged commit 2f7a27b into s-yata:master Jun 15, 2020
@s-yata
Copy link
Owner

s-yata commented Jun 15, 2020

Thank you!

@jmr jmr deleted the select-bit-32 branch June 15, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants