I have a program I ported from C to Java. Both apps use quicksort to order some partitioned data (genomic coordinates).
The Java version runs fast, but I\'d like to get
Here's what I would do, in any language. If samples show that your sort-comparison routine is active a large percentage of the time, you might find a way to simplify it. But maybe the time is going elsewhere. Diagnose first, to see what's broken, before you fix anything. Chances are, if you fix the biggest thing, then something else will be the biggest thing, and so on, until you've really gotten a pretty good speedup.