I am trying to compare the performance of locked and lock free linked list data structure. I have implemented this algorithm for lock free linked list. Both the programs are implemented in C.
I am testing for 4 threads. Each thread has 1000 insert operations.
I am using Intel PCM tool to measure the performance.
Here are my findings: Lock free:
Median of L3 Misses=1012699
Median of L2 Misses=1479741
Median of L3 Hits=484128
Median of L2 Hits=1797537
Median of Time=1.80696
Median of Cycles=5296042019
Median of IPC=1.536135
Median of Bytes Read=444423232
Median of Bytes Written=25414144
Locked:
Median of L3 Misses=711796.5
Median of L2 Misses=1517899
Median of L3 Hits=819408.5
Median of L2 Hits=2282527
Median of Time=0.244517
Median of Cycles=894265192
Median of IPC=0.8495695
Median of Bytes Read=174872576
Median of Bytes Written=24722912
The locked version performs better on every count except IPC. Is this what is supposed to happen? Or the lock Free data structure should perform better?
If yes, then what is the benefit of using lock free data structures? Any help will be appreciated.