Will using multiple threads with a RandomAccessFile help performance?

后端 未结 7 2121
滥情空心
滥情空心 2020-12-03 16:32

I am working on a (database-ish) project, where data is stored in a flat file. For reading/writing I\'m using the RandomAccessFile class. Will I gain anything f

7条回答
  •  攒了一身酷
    2020-12-03 16:37

    I am surprised every answer talks about performance, but no one distinguishes latency from throughput, whereas both are performance characteristics. While you may gain additional throughput employing multiple threads, as @RED SOFT ADAIR has shown, you trade off latency, especially in a case of Native Command Sequencing.

提交回复
热议问题