Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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
Question ajoutée par Utilisateur supprimé
Date de publication: 2013/08/22
Daanish Rumani
par 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.

More Questions Like This