[Development] QMutex with pthread on Linux

Thiago Macieira thiago.macieira at intel.com
Thu Aug 23 12:51:42 CEST 2012


On quarta-feira, 22 de agosto de 2012 13.21.03, bradley.hughes at nokia.com 
wrote:
> Wow… do you get the same results with Qt 4? I did quite a bit to optimize
> contention performance in Qt 4. I do know that mutex contention performance
> has regressed in Qt 5 on the Mac, I wasn't sure about on Linux, though.

4.8 results, on the same machine, same build options, same everything:

(second best result out of 9 runs, to exclude outliers)

RESULT : tst_QMutex::uncontendedQMutex():
     62.2731147 CPU ticks per iteration
        465.803163 task-clock                #    0.999 CPUs utilized          
     1,556,403,915 cycles                    #    3.341 GHz                    
     1,728,088,651 instructions              #    1.11  insns per cycle        
               271 raw_syscalls:sys_enter    #    0.582 K/sec                  
       0.466074468 seconds time elapsed

RESULT : tst_QMutex::contendedQMutex():"no msleep, 1 mutex":
     2,235,753.069 CPU ticks per iteration
       6331.041527 task-clock                #    3.758 CPUs utilized          
    20,161,652,971 cycles                    #    3.185 GHz                    
    15,429,162,599 instructions              #    0.77  insns per cycle        
         9,022,998 raw_syscalls:sys_enter    #    1.425 M/sec                  
       1.684687915 seconds time elapsed


RESULT : tst_QMutex::contendedQMutex():"no msleep, 2 mutexes":
     4,368,748.283 CPU ticks per iteration
      10941.737969 task-clock                #    3.786 CPUs utilized          
    34,877,133,530 cycles                    #    3.188 GHz                    
    26,077,481,434 instructions              #    0.75  insns per cycle        
        14,471,550 raw_syscalls:sys_enter    #    1.323 M/sec                  
       2.889920428 seconds time elapsed

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120823/e253463d/attachment.sig>


More information about the Development mailing list