On quinta-feira, 4 de outubro de 2012 15.46.57, André Somers wrote: > If you think that running 21 threads on an 8 core system will run make > your task go faster, then Thiago is right: you don't understand your > problem.
If you run 8 threads on an 8-core system and they use the CPU fully, then you're running as fast as you can. If you have more threads than the number of processors and if all threads are ready to be executed, then the OS will schedule timeslices to each thread. That means threads get executed and suspended all the time, sometimes migrating between processors. That adds overhead. If it adds overhead, it's slower. Depending on your OS, it might be considerably slower. If you do not understand what I said, understand this: there's a reason why QtConcurrent runs as many threads as there are processors. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest