[ https://issues.apache.org/jira/browse/LUCENE-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561836#action_12561836 ]
Eks Dev commented on LUCENE-1145: --------------------------------- Well, I do not know how it behaves on earlier jvm-s and what would be the "jvm we optimize", I would not be surprised if jvm 6+ evolved optimization methods. These patches are just side effects of trying to get familiar with scorer family inner working in light of LUCENE-584. Boolean arithmetic on multiple skipping iterators in Scorers can hardly be beaten and can be recycled for cases like BooleanFilter... and maybe one day merged to avoid code duplication :) Anyhow, if it proves that performance on 1.4 behaves similarly, I would opt for size(), makes code slightly cleaner. If not, I would suggest to replace the only size() usage in next() with cached queueSize > DisjunctionSumScorer small tweak > -------------------------------- > > Key: LUCENE-1145 > URL: https://issues.apache.org/jira/browse/LUCENE-1145 > Project: Lucene - Java > Issue Type: Improvement > Components: Search > Environment: all > Reporter: Eks Dev > Priority: Trivial > Attachments: DisjunctionSumScorerOptimization.patch, > DSSQueueSizeOptimization.patch, TestScorerPerformance.java > > > Move ScorerDocQueue initialization from next() and skipTo() methods to the > Constructor. Makes DisjunctionSumScorer a bit faster (less than 1% on my > tests). > Downside (if this is one, I cannot judge) would be throwing IOException from > DisjunctionSumScorer constructors as we touch HardDisk there. I see no > problem as this IOException does not propagate too far (the only modification > I made is in BooleanScorer2) > if (scorerDocQueue == null) { > initScorerDocQueue(); > } > > Attached test is just quick & dirty rip of TestScorerPerf from standard > Lucene test package. Not included as patch as I do not like it. > All test pass, patch made on trunk revision 613923 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]