lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: computing size() in frequently used methods
Date Tue, 26 Nov 2002 16:30:57 GMT
Julien Nioche wrote:
> This kind of modification could be done in almost all the methods of the
> classes BooleanQuery and PhraseQuery, providing a small  optimization (I did
> not mesure it - but even small optimizations can be useful).

These computations are performed only once per search.  I would be very 
surprised if they significantly improved performance.  Optimizations 
that do not significantly improve performance are usually a bad idea, 
since they tend to make the code larger, harder to understand, harder to 
maintain, buggier, etc.  In general, a significant overall speedup in a 
real task must be shown to warrant a performance optimization.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message