Compare performance of Concurrent Dictionary with Dictionary+Locks
Comparison


A comparison of performance of 2 classes only makes sense if both adhere to the same specification. Does your class do what a ConcurrentDictionary does?


Review


Why would you allow access to the underlying dictionary? If you must allow it, return a IReadOnlyDictionary.
Checking arguments before taking a lock prevents unnecessary locks on bad input.
AddOrUpdate does not work; have you checked  if (result == value)?


int[] a = new int[]{ 0, 1 }; 
int[] b = new int[]{ 0, 1 }; 
Console.WriteLine(a == b);  // False


Or is this as designed?


What is the purpose of this? What if both arrays have different size?



 Parallel.For(0, value.Length,
 (i, state) =&gt;
 {
     result[i] = result[i] + value[i];
 });