lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: [jira] Created: (LUCENE-1172) Small speedups to DocumentsWriter
Date Sat, 09 Feb 2008 15:27:09 GMT
On Feb 8, 2008 8:00 PM, robert engels <> wrote:
> Curious... on things like this, is it really worth adding (and
> maintaining) Lucene's own sort,

Unfortunately, Java's sort on Object[] is a mergeSort, and they
allocate an axillary array to support that.
Mike's latest tests show a 4% speedup on smaller documents, so I think
it's worth it.  While DocumentsWriter is certainly very complex, a
specific sort routine makes it no more complex IMO.

I wonder how well a single generic quickSort(Object[] arr, int low,
int high) would perform vs the type-specific ones?  I guess the main
overhead would be a cast from Object to the specific class to do the
compare?  Too bad Java doesn't have true generics/templates.


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

View raw message