Java performance tips

前端 未结 14 1580
傲寒
傲寒 2021-02-01 20:04

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

相关标签:
14条回答
  • 2021-02-01 20:55

    Can't you use the sort functions that are included in the Java library?

    You could at least look at the speed difference between the two sorting functions.

    0 讨论(0)
  • 2021-02-01 20:58

    Perhaps there are other routes to performance enhancement other than micro-optimization of code. How about a different algorithm to achieve what you wanted your program to do? May be a different data structure?

    Or trade some disk/ram space for speed, or if you can give up some time upfront during the loading of your program, you can precompute lookup tables instead of doing calculations - that way, the processing is fast. I.e., make some trade-offs of other resources available.

    0 讨论(0)
提交回复
热议问题