Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Improved null count calculation (5x) #343

Merged
merged 2 commits into from Aug 26, 2021
Merged

Improved null count calculation (5x) #343

merged 2 commits into from Aug 26, 2021

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Aug 26, 2021

The idea behind is that we do not need to merge bytes together to count zeros and ones since the position of the bit is not relevant.

git checkout d4b6aaa0985d44b9fc12a12524aa3954a8ce1537
cargo bench --no-default-features --bench count_zeros -- "2\^20"
git checkout unset_count
cargo bench --no-default-features --bench count_zeros -- "2\^20"
count_zeros 2^20        time:   [135.69 us 136.82 us 138.37 us]                             
                        change: [-82.268% -82.051% -81.805%] (p = 0.00 < 0.05)

count_zeros offset 2^20 time:   [136.00 us 136.74 us 137.59 us]                                    
                        change: [-82.323% -82.159% -81.997%] (p = 0.00 < 0.05)

Also renamed null_count to count_zeros (closes #342)

@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label Aug 26, 2021
@codecov
Copy link

codecov bot commented Aug 26, 2021

Codecov Report

Merging #343 (a063b99) into main (f79ae3e) will increase coverage by 0.09%.
The diff coverage is 98.03%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #343      +/-   ##
==========================================
+ Coverage   80.97%   81.07%   +0.09%     
==========================================
  Files         326      326              
  Lines       21167    21357     +190     
==========================================
+ Hits        17141    17315     +174     
- Misses       4026     4042      +16     
Impacted Files Coverage Δ
src/bitmap/immutable.rs 84.61% <66.66%> (ø)
src/bitmap/mutable.rs 89.21% <100.00%> (ø)
src/bitmap/utils/mod.rs 100.00% <100.00%> (ø)
tests/it/bitmap/utils/mod.rs 100.00% <100.00%> (ø)
tests/it/io/csv/read.rs 100.00% <0.00%> (ø)
src/array/equal/mod.rs 91.26% <0.00%> (+1.58%) ⬆️
src/io/json/read/infer_schema.rs 91.70% <0.00%> (+3.03%) ⬆️
src/io/csv/read/deserialize.rs 60.28% <0.00%> (+4.03%) ⬆️
src/io/json/read/deserialize.rs 80.55% <0.00%> (+5.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f79ae3e...a063b99. Read the comment docs.

@jorgecarleitao jorgecarleitao changed the title Improved null count calculation (4x) Improved null count calculation (5x) Aug 26, 2021
@jorgecarleitao jorgecarleitao merged commit 87aa617 into main Aug 26, 2021
@jorgecarleitao jorgecarleitao deleted the unset_count branch August 26, 2021 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renamed bitmap::utils::null_count to bitmap::utils::count_zeros
1 participant