how to do multiprocessing in java, and what speed gains to expect?

前端 未结 6 1893
失恋的感觉
失恋的感觉 2021-02-02 14:44

I am a newbie using Java to do some data processing on csv files. For that I use the multithreading capabilities of Java (pools of threads) to batch-import the csv files into Ja

6条回答
  •  感情败类
    2021-02-02 15:29

    I am curious to know how/whether multiprocessing would speed up the operations even more?

    No, in fact it would likely make it worse. If you were to switch from multithreading to multiprocessing, then you would effectively launch the JVM multiple times. Starting up a JVM is no simple effort. In fact, the way the JVM on your desktop machine starts is different from the way an enterprise company starts their JVM, just to reduce wait time for applets to launch for the typical end-user.

提交回复
热议问题