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

Refactoring dyn Column #1502

Merged
merged 1 commit into from
Sep 2, 2022
Merged

Refactoring dyn Column #1502

merged 1 commit into from
Sep 2, 2022

Conversation

fulmicoton
Copy link
Collaborator

@fulmicoton fulmicoton commented Sep 2, 2022

Further refactoring...

This removes the DynamicFastFieldReader and we now just deal with a Arc<dyn Column>.
The code ends up simpliied a notch.

I do not observe any regression (nor perf improvment)_.

After

cargo +nightly bench --features unstable bench_intfastfield
    Finished bench [optimized] target(s) in 0.08s
     Running unittests src/lib.rs (target/release/deps/tantivy-66e9d65f044be08d)

running 7 tests
test fastfield::bench::bench_intfastfield_jumpy_fflookup                                                                 ... bench:     450,360 ns/iter (+/- 1,397)
test fastfield::bench::bench_intfastfield_jumpy_veclookup                                                                ... bench:     670,624 ns/iter (+/- 6,486)
test fastfield::bench::bench_intfastfield_scan_all_fflookup                                                              ... bench:     174,085 ns/iter (+/- 2,212)
test fastfield::bench::bench_intfastfield_scan_all_fflookup_gcd                                                          ... bench:     199,005 ns/iter (+/- 3,396)
test fastfield::bench::bench_intfastfield_scan_all_vec                                                                   ... bench:       9,651 ns/iter (+/- 300)
test fastfield::bench::bench_intfastfield_stride7_fflookup                                                               ... bench:      21,976 ns/iter (+/- 243)
test fastfield::bench::bench_intfastfield_stride7_vec                                                                    ... bench:       8,493 ns/iter (+/- 127)

Before

❯ cargo +nightly bench --features unstable bench_intfastfield
    Finished bench [optimized] target(s) in 0.07s
     Running unittests src/lib.rs (target/release/deps/tantivy-66e9d65f044be08d)

running 7 tests
test fastfield::bench::bench_intfastfield_jumpy_fflookup                                                                 ... bench:     450,952 ns/iter (+/- 2,179)
test fastfield::bench::bench_intfastfield_jumpy_veclookup                                                                ... bench:     678,692 ns/iter (+/- 9,008)
test fastfield::bench::bench_intfastfield_scan_all_fflookup                                                              ... bench:     174,656 ns/iter (+/- 1,399)
test fastfield::bench::bench_intfastfield_scan_all_fflookup_gcd                                                          ... bench:     199,451 ns/iter (+/- 2,433)
test fastfield::bench::bench_intfastfield_scan_all_vec                                                                   ... bench:       9,671 ns/iter (+/- 92)
test fastfield::bench::bench_intfastfield_stride7_fflookup                                                               ... bench:      21,999 ns/iter (+/- 151)
test fastfield::bench::bench_intfastfield_stride7_vec                                                                    ... bench:       9,103 ns/iter (+/- 1,051)

@fulmicoton fulmicoton requested a review from PSeitz September 2, 2022 03:02
@fulmicoton fulmicoton force-pushed the refact-dyn-col branch 2 times, most recently from 62eb485 to 030fd1d Compare September 2, 2022 03:12
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2022

Codecov Report

Merging #1502 (7c1059e) into main (84e0c75) will decrease coverage by 0.02%.
The diff coverage is 95.54%.

@@            Coverage Diff             @@
##             main    #1502      +/-   ##
==========================================
- Coverage   94.04%   94.02%   -0.03%     
==========================================
  Files         241      241              
  Lines       44870    44796      -74     
==========================================
- Hits        42199    42119      -80     
- Misses       2671     2677       +6     
Impacted Files Coverage Δ
src/aggregation/bucket/histogram/histogram.rs 99.61% <ø> (ø)
src/aggregation/bucket/range.rs 97.01% <ø> (ø)
src/collector/filter_collector_wrapper.rs 84.84% <ø> (ø)
src/collector/histogram_collector.rs 98.98% <ø> (ø)
src/collector/tests.rs 98.18% <ø> (ø)
src/collector/top_score_collector.rs 96.85% <ø> (ø)
src/fastfield/multivalued/mod.rs 97.05% <ø> (ø)
src/indexer/doc_id_mapping.rs 97.72% <ø> (ø)
src/indexer/index_writer.rs 96.82% <ø> (ø)
src/lib.rs 96.48% <ø> (ø)
... and 30 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@PSeitz PSeitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except minor comments

@fulmicoton fulmicoton merged commit 8e775b6 into main Sep 2, 2022
@fulmicoton fulmicoton deleted the refact-dyn-col branch September 2, 2022 08:26
This was referenced Jan 13, 2023
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.

3 participants