Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve DAC vector performance by using plain bit vectors by default #369

Merged
merged 4 commits into from
May 2, 2017

Conversation

niklasb
Copy link
Contributor

@niklasb niklasb commented Apr 28, 2017

The old version (which compresses slightly better) can still be chosen by using dac_vector_dp<rrr_vector<>>. The new version uses plain bit vectors, which has vastly superior query times. Example run:

These are the resulting data structure sizes:

random exponential test 9
old = 303961
new (plain) with 1 levels = 290689
new (plain) with 2 levels = 261706
new (plain) with 4 levels = 257820
new (rrr) with 1 levels = 276308
new (rrr) with 2 levels = 252565
new (rrr) with 4 levels = 250591

These are timings:

benchmark size 10000
dac_vector levels 6
dac_vector_dp levels 4
time dac_vector 6746
time dac_vector_dp 2049
time dac_vector_dp<rrr_vector<>> 64340
benchmark size 100000
dac_vector levels 6
dac_vector_dp levels 4
time dac_vector 7959
time dac_vector_dp 2178
time dac_vector_dp<rrr_vector<>> 66496
benchmark size 1000000
dac_vector levels 6
dac_vector_dp levels 4
time dac_vector 10827
time dac_vector_dp 3274
time dac_vector_dp<rrr_vector<>> 65654
benchmark size 10000000
dac_vector levels 6
dac_vector_dp levels 5
time dac_vector 31223
time dac_vector_dp 6775
time dac_vector_dp<rrr_vector<>> 86530

@simongog simongog merged commit 6373049 into simongog:master May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants