ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How to calculate the expected gain in the performance, if program code needs to be modified from single-thread to multi-threaded?

The cpu on the machine that will run the program has10 cores(20 logical cpus)

user-image
تم إضافة السؤال من قبل مستخدم محذوف‎
تاريخ النشر: 2013/08/22
Daanish Rumani
من قبل Daanish Rumani , Product Manager , Publicis Sapient

It actually depends on the nature of the program.
If the program itself is single threaded then the expected gain is zero.
In general if you have n parallel threads in your program you would get performance gain until you use n cores.
You can make a very coarse calculation assuming all the threads have relatively similar loads and processor demands.
n threads on 1 core would take say n units of time.
n threads on n cores would take 1 unit do time.
therefore n threads on m cores where m would take round(n/m) units of time.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟