On Feb 8, 2008 8:00 PM, robert engels <[EMAIL PROTECTED]> 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. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]