Java performance tips

前端 未结 14 1602
傲寒
傲寒 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:52

    If your algorithm is CPU-heavy, you may want to consider taking advantage of parallelisation. You may be able to sort in multiple threads and merge the results back later.

    This is however not a decision to be taken lightly, as writing concurrent code is hard.

提交回复
热议问题