如何确定最佳线程数? [英] How can I determine optimal number of threads?

查看:79
本文介绍了如何确定最佳线程数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人
尝试开发速度更快的软件,我试图将工作划分为多个线程.实际上,我正在做的事情只是计算完全独立的内容(线程之间没有依赖关系).

是否存在确定最佳线程数的规则/方法,或者仅仅是内核数?

在此先感谢.

Dear all
Trying to make faster software I’m trying to divide the work over threads. Actually the things I’m working on are simply calculating completely independent stuff (no dependencies between the threads).

Is there a rule/method to determine the optimal number of threads or is it maybe simply the number of cores?

Thanks in advance.

推荐答案

看看这个stackoverflow答案
look this stackoverflow answers http://stackoverflow.com/questions/1442851/how-to-determine-the-optimum-number-of-worker-threads[^]
--NDK


这篇关于如何确定最佳线程数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆