Ghazi Bouselmi's Pages


Here you can find out who I am. Well, also my CV, my publications 

LinkedIn : http://www.linkedin.com/in/ghazibouselmi  View Ghazi Bouselmi's profile on LinkedIn

30-11-2016 bug fixes.
01-12-2016 bug fixes.
19-12-2016 bug fixes.

OpenOffice document here.


Circular buffers with in-spin sleep








2 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 708 28.56%

Baseline< private_critical_section > 1170 28.56%

Baseline-V2< std::mutex > 251 28.56%

Baseline-V2< private_critical_section > 278 57.11%

Improved (mutex-less) 182 28.56%






4 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 1494 46.21%

Baseline< private_critical_section > 4767 46.47%

Baseline-V2< std::mutex > 679 38.08%

Baseline-V2< private_critical_section > 1149 95.20%

Improved (mutex-less) 321 47.61%






8 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 2397 47.61%

Baseline< private_critical_section > 13679 67.89%

Baseline-V2< std::mutex > 1758 66.65%

Baseline-V2< private_critical_section > 1367 123.78%

Improved (mutex-less) 657 57.13%






16 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 4648 66.65%

Baseline< private_critical_section > 31537 133.30%

Baseline-V2< std::mutex > 3324 123.78%

Baseline-V2< private_critical_section > 3085 66.65%

Improved (mutex-less) 1136 19.04%






32 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 9253 74.36%

Baseline< private_critical_section > 66953 19.04%

Baseline-V2< std::mutex > 6461 95.22%

Baseline-V2< private_critical_section > 7399 114.25%

Improved (mutex-less) 2220 57.12%











Circular buffers without in-spin sleep








2 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 6750 28.56%

Baseline< private_critical_section > 1355 28.56%

Baseline-V2< std::mutex > 274 28.56%

Baseline-V2< private_critical_section > 282 57.13%

Improved (mutex-less) 164 57.12%






4 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 14749 47.61%

Baseline< private_critical_section > 6588 47.60%

Baseline-V2< std::mutex > 920 47.61%

Baseline-V2< private_critical_section > 1372 47.61%

Improved (mutex-less) 351 47.61%






8 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > 58518 90.08%

Baseline< private_critical_section > 37477 105.72%

Baseline-V2< std::mutex > 2502 78.07%

Baseline-V2< private_critical_section > 3781 77.26%

Improved (mutex-less) 1256 103.77%






16 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > N/A N/A

Baseline< private_critical_section > N/A N/A

Baseline-V2< std::mutex > 5920 90.93%

Baseline-V2< private_critical_section > 19917 92.95%

Improved (mutex-less) 4573 73.19%






32 producers Time (ms) CPU-Usage

Baseline< std::recursive_mutex > N/A N/A

Baseline< private_critical_section > N/A N/A

Baseline-V2< std::mutex > 12617 93.73%

Baseline-V2< private_critical_section > 67252 86.33%

Improved (mutex-less) 9085 89.97%











Synchronization tests (modifying 1 variable)








2 threads Time (ms) CPU-Usage

Private/new critical section < std::atomic > 542 19.04%

Private/new critical section non recursive
< std::atomic >
442 38.07%

Private/new critical section
< WinAPI::InterlockedXXXX >
682 9.52%

Private/new mutex (waitable HANDLE) 6599 38.08%

std::mutex 916 19.04%

std::recursive_mutex 903 19.04%

WinAPI::CRITICAL_SECTION 2127 38.08%

WinAPI::MUTEX N/A N/A






4 threads Time (ms) CPU-Usage

Private/new critical section < std::atomic > 1041 19.04%

Private/new critical section non recursive
< std::atomic >
890 37.17%

Private/new critical section
< WinAPI::InterlockedXXXX >
1401 9.30%

Private/new mutex (waitable HANDLE) 15709 28.56%

std::mutex 2253 38.09%

std::recursive_mutex 2192 38.09%

WinAPI::CRITICAL_SECTION 8171 76.17%

WinAPI::MUTEX N/A N/A






8 threads Time (ms) CPU-Usage

Private/new critical section < std::atomic > 2154 19.04%

Private/new critical section non recursive
< std::atomic >
1825 37.18%

Private/new critical section
< WinAPI::InterlockedXXXX >
2849 19.51%

Private/new mutex (waitable HANDLE) 62998 19.04%

std::mutex 4891 95.88%

std::recursive_mutex 4926 52.93%

WinAPI::CRITICAL_SECTION 21149 57.13%

WinAPI::MUTEX N/A N/A






16 threads Time (ms) CPU-Usage

Private/new critical section < std::atomic > 4984 38.08%

Private/new critical section non recursive
< std::atomic >
3989 66365.00%

Private/new critical section
< WinAPI::InterlockedXXXX >
5849 9.52%

Private/new mutex (waitable HANDLE) 154461 57.12%

std::mutex 9858 106.46%

std::recursive_mutex 10070 89.18%

WinAPI::CRITICAL_SECTION 51567 62.23%

WinAPI::MUTEX N/A N/A











Microsecond sleep Averages CPU-Usage

2 threads – 100 micro-sec sleep 110 - 111 18.59%

4 threads – 100 micro-sec sleep 116 9.52%

8 threads – 100 micro-sec sleep 139 – 140 48.29%

16 threads – 100 micro-sec sleep 161 – 166 69.26%

32 threads – 100 micro-sec sleep 613 – 617 79.85%











Waitable timers Average CPU-Usage

2 threads
37.18%

1. 100 micro seconds 90


2. 200 micro seconds 192







4 threads
18.59%

1. 100 micro seconds 89


2. 200 micro seconds 193


3. 300 micro seconds 292


4. 400 micro seconds 390







8 threads
19.04%

1. 100 micro seconds 92


2. 200 micro seconds 195


3. 300 micro seconds 294


4. 400 micro seconds 398


5. 500 micro seconds 496


6. 600 micro seconds 593


7. 700 micro seconds 695


8. 800 micro seconds 797







16 threads
18.16%

1. 100 micro seconds 99


2. 200 micro seconds 203


3. 300 micro seconds 316


4. 400 micro seconds 421


5. 500 micro seconds 514


6. 600 micro seconds 634


7. 700 micro seconds 736


8. 800 micro seconds 838


9. 900 micro seconds 947


10. 1000 micro seconds 1056


11. 1100 micro seconds 1156


12. 1200 micro seconds 1254


13. 1300 micro seconds 1359


14. 1400 micro seconds 1475


15. 1500 micro seconds 1570


16. 1600 micro seconds 1670







32 threads
33.95%

1. 100 micro seconds 92


2. 200 micro seconds 198


3. 300 micro seconds 298


4. 400 micro seconds 408


5. 500 micro seconds 511


6. 600 micro seconds 607


7. 700 micro seconds 714


8. 800 micro seconds 823


9. 900 micro seconds 921


10. 1000 micro seconds 1033


11. 1100 micro seconds 1127


12. 1200 micro seconds 1233


13. 1300 micro seconds 1333


14. 1400 micro seconds 1431


15. 1500 micro seconds 1535


16. 1600 micro seconds 1630


17. 1700 micro seconds 1744


18. 1800 micro seconds 1847


19. 1900 micro seconds 1948


20. 2000 micro seconds 2033


21. 2100 micro seconds 2147


22. 2200 micro seconds 2256


23. 2300 micro seconds 2347


24. 2400 micro seconds 2457


25. 2500 micro seconds 2564


26. 2600 micro seconds 2643


27. 2700 micro seconds 2753


28. 2800 micro seconds 2849


29. 2900 micro seconds 2951


30. 3000 micro seconds 3075


31. 3100 micro seconds 3159


32. 3200 micro seconds 3249












Events & WaitForMultipleObjects








2 event – 2 threads Time (ms) CPU-Usage

Private/new events 2926 27.88%

WinAPI::HANDLE 6253 48.47%






2 event – 4 threads Time (ms) CPU-Usage

Private/new events 2540 46.47%

WinAPI::HANDLE 8878 37.16%






2 event – 8 threads Time (ms) CPU-Usage

Private/new events 1566 81.85%

WinAPI::HANDLE 21747 47.60%






2 event – 16 threads Time (ms) CPU-Usage

Private/new events 1486 40.38%

WinAPI::HANDLE 22017 37.00%






2 event – 32 threads Time (ms) CPU-Usage

Private/new events 1479 57.25%

WinAPI::HANDLE 22032 28.56%






4 event – 2 threads Time (ms) CPU-Usage

Private/new events 3168 27.87%

WinAPI::HANDLE 7667 28.56%






4 event – 4 threads Time (ms) CPU-Usage

Private/new events 4059 92.94%

WinAPI::HANDLE 8878 37.16%






4 event – 8 threads Time (ms) CPU-Usage

Private/new events 2108 76.89%

WinAPI::HANDLE 24436 66.65%






4 event – 16 threads Time (ms) CPU-Usage

Private/new events 1878 87.32%

WinAPI::HANDLE 25465 28.56%






4 event – 32 threads Time (ms) CPU-Usage

Private/new events 2059 78.07%

WinAPI::HANDLE 25446 28.56%






8 event – 2 threads Time (ms) CPU-Usage

Private/new events 2245 55.77%

WinAPI::HANDLE 6651 57.12%






8 event – 4 threads Time (ms) CPU-Usage

Private/new events 3276 47.60%

WinAPI::HANDLE 9628 47.60%






8 event – 8 threads Time (ms) CPU-Usage

Private/new events 1889 55.77%

WinAPI::HANDLE 28560 55.55%






8 event – 16 threads Time (ms) CPU-Usage

Private/new events 1786 94.23%

WinAPI::HANDLE 30284 9.25%






8 event – 32 threads Time (ms) CPU-Usage

Private/new events 1840 106.46%

WinAPI::HANDLE 30358 9.52%






16 event – 2 threads Time (ms) CPU-Usage

Private/new events 1645 27.88%

WinAPI::HANDLE 6028 9.29%






16 event – 4 threads Time (ms) CPU-Usage

Private/new events 2428 47.60%

WinAPI::HANDLE 9628 47.60%






16 event – 8 threads Time (ms) CPU-Usage

Private/new events 2061 84.08%

WinAPI::HANDLE 19130 27.74%






16 event – 16 threads Time (ms) CPU-Usage

Private/new events 1959 80.37%

WinAPI::HANDLE 40565 28.56%






16 event – 32 threads Time (ms) CPU-Usage

Private/new events 1734 76.89%

WinAPI::HANDLE 40189 28.56%






32 event – 2 threads Time (ms) CPU-Usage

Private/new events 1245 55.75%

WinAPI::HANDLE 5559 28.56%






32 event – 4 threads Time (ms) CPU-Usage

Private/new events 1618 46.47%

WinAPI::HANDLE 6593 95.21%






32 event – 8 threads Time (ms) CPU-Usage

Private/new events 2021 81.85%

WinAPI::HANDLE 22571 28.56%






32 event – 16 threads Time (ms) CPU-Usage

Private/new events 1800 78.07%

WinAPI::HANDLE 60008 75.73%






32 event – 32 threads Time (ms) CPU-Usage

Private/new events 1820 88.72%

WinAPI::HANDLE 59761 28.56%