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

LUCENE-8762: Introduce Specialized Impacts For Doc + Freq #779

Closed
wants to merge 3 commits into from

Conversation

atris
Copy link
Contributor

@atris atris commented Jul 12, 2019

ant test for both Lucene and Solr pass. ant precommit passes as well.

I did not add new tests since multiple existing tests exercise the new functionality

@atris
Copy link
Contributor Author

atris commented Jul 12, 2019

cc: @jpountz

@atris
Copy link
Contributor Author

atris commented Jul 15, 2019

Any thoughts on this one? I am hoping this will bring gains to our nightly benchmarks :)

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

Have you tried to run luceneutil on this change?

@atris
Copy link
Contributor Author

atris commented Jul 16, 2019

@jpountz I have fixed your comments, please let me know if they look fine.

luceneutil is running right now with 10k documents, will post results ASAP

@jpountz
Copy link
Contributor

jpountz commented Jul 17, 2019

I don't expect your last commit to help since impacts should always be requested with frequencies. What I had in mind when mentioning loading frequencies lazily was to do something similar to what was done in #595 to only read and decode the block of frequencies if freq() is called on the current block.

@atris
Copy link
Contributor Author

atris commented Jul 17, 2019

Ah, yes, that makes sense. I did a couple of more runs with 10m docs and saw similar results.

Will update the PR

@atris
Copy link
Contributor Author

atris commented Jul 17, 2019

@jpountz Updated the PR with lazy loading. Please let me know if it looks fine

@atris
Copy link
Contributor Author

atris commented Jul 17, 2019

luceneutil run:

https://gist.github.com/atris/1b2c25021ca11138338aa73efde2aa38

wikimedium2m

private int accum; // accumulator for doc deltas
private int freq; // freq we last read

private boolean needsFreq; // true if the caller actually needs frequencies
Copy link
Contributor

Choose a reason for hiding this comment

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

This will always be true, it is illegal to read impacts and not ask for term frequencies (it doesn't make much sense).

@jpountz
Copy link
Contributor

jpountz commented Jul 17, 2019

I ran luceneutil on this patch on my machine too and I'm getting similar results. It's a bit disappointing, I was expecting some gains though I'm rather happy that we can keep things easier to maintain by not having to sepcialize too much. Sorry for the time you spent on it but I think it's better to keep things the way they are today?

@atris
Copy link
Contributor Author

atris commented Jul 17, 2019

I ran luceneutil on this patch on my machine too and I'm getting similar results. It's a bit disappointing, I was expecting some gains though I'm rather happy that we can keep things easier to maintain by not having to sepcialize too much. Sorry for the time you spent on it but I think it's better to keep things the way they are today?

No sweat, I understand. Makes sense to keep things straightforward!

@atris atris closed this Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants