Efficient Number of Threads

前端 未结 6 546
小鲜肉
小鲜肉 2020-12-28 10:23

I want to optimize my application number of threads. Almost all of them have IO beside CPU usage in an equal value. How much is the efficient number of threads when there ar

6条回答
  •  臣服心动
    2020-12-28 11:14

    There is really no universal answer to this. The number of threads you spawn is a function of how many tasks you are doing, how they communicate and how you design your application. I have had extremely large apps that have only one thread that runs fine. On the other hand I have also had small applications that mandated multiple threads for performance sake.

    (Sorry for any spelling/formatting issues, I typed this off of my phone)

提交回复
热议问题