Saturday, December 3, 2016

Performance of different lock methods in .net, results table

This post only contains the results table for the test. Full report can be found in this post:
http://dreamstatecoding.blogspot.com/2016/12/performance-of-different-lock-methods.html

Results, single-threaded

CacheUnsafeAdd DataCount 16 Iterations: 1000 Average: 0,177 ticks
CacheUnsafeGet DataCount 16 Iterations: 1000 Average: 0,222 ticks
CacheUnsafeSearch DataCount 16 Iterations: 1000 Average: 1,057 ticks
CacheUnsafeClear DataCount 16 Iterations: 1000 Average: 0,306 ticks
CacheFullLockAdd DataCount 16 Iterations: 1000 Average: 0,238 ticks
CacheFullLockGet DataCount 16 Iterations: 1000 Average: 0,283 ticks
CacheFullLockSearch DataCount 16 Iterations: 1000 Average: 0,806 ticks
CacheFullLockClear DataCount 16 Iterations: 1000 Average: 0,55 ticks
CacheFullLockIxAdd DataCount 16 Iterations: 1000 Average: 0,342 ticks
CacheFullLockIxGet DataCount 16 Iterations: 1000 Average: 0,305 ticks
CacheFullLockIxSearch DataCount 16 Iterations: 1000 Average: 0,378 ticks
CacheFullLockIxClear DataCount 16 Iterations: 1000 Average: 0,738 ticks
CacheWriteLockAdd DataCount 16 Iterations: 1000 Average: 0,357 ticks
CacheWriteLockGet DataCount 16 Iterations: 1000 Average: 0,442 ticks
CacheWriteLockSearch DataCount 16 Iterations: 1000 Average: 1,018 ticks
CacheWriteLockClear DataCount 16 Iterations: 1000 Average: 0,602 ticks
CacheConcurrentAdd DataCount 16 Iterations: 1000 Average: 3,9 ticks
CacheConcurrentGet DataCount 16 Iterations: 1000 Average: 0,275 ticks
CacheConcurrentSearch DataCount 16 Iterations: 1000 Average: 48,013 ticks
CacheConcurrentClear DataCount 16 Iterations: 1000 Average: 46,609 ticks
CacheUnsafeAdd DataCount 128 Iterations: 1000 Average: 0,137 ticks
CacheUnsafeGet DataCount 128 Iterations: 1000 Average: 0,188 ticks
CacheUnsafeSearch DataCount 128 Iterations: 1000 Average: 2,94 ticks
CacheUnsafeClear DataCount 128 Iterations: 1000 Average: 0,591 ticks
CacheFullLockAdd DataCount 128 Iterations: 1000 Average: 0,188 ticks
CacheFullLockGet DataCount 128 Iterations: 1000 Average: 0,237 ticks
CacheFullLockSearch DataCount 128 Iterations: 1000 Average: 2,821 ticks
CacheFullLockClear DataCount 128 Iterations: 1000 Average: 0,608 ticks
CacheFullLockIxAdd DataCount 128 Iterations: 1000 Average: 0,257 ticks
CacheFullLockIxGet DataCount 128 Iterations: 1000 Average: 0,229 ticks
CacheFullLockIxSearch DataCount 128 Iterations: 1000 Average: 0,304 ticks
CacheFullLockIxClear DataCount 128 Iterations: 1000 Average: 0,961 ticks
CacheWriteLockAdd DataCount 128 Iterations: 1000 Average: 0,286 ticks
CacheWriteLockGet DataCount 128 Iterations: 1000 Average: 0,364 ticks
CacheWriteLockSearch DataCount 128 Iterations: 1000 Average: 2,883 ticks
CacheWriteLockClear DataCount 128 Iterations: 1000 Average: 0,719 ticks
CacheConcurrentAdd DataCount 128 Iterations: 1000 Average: 1,651 ticks
CacheConcurrentGet DataCount 128 Iterations: 1000 Average: 0,233 ticks
CacheConcurrentSearch DataCount 128 Iterations: 1000 Average: 48,919 ticks
CacheConcurrentClear DataCount 128 Iterations: 1000 Average: 45,472 ticks
CacheUnsafeAdd DataCount 256 Iterations: 1000 Average: 0,136 ticks
CacheUnsafeGet DataCount 256 Iterations: 1000 Average: 0,174 ticks
CacheUnsafeSearch DataCount 256 Iterations: 1000 Average: 5,088 ticks
CacheUnsafeClear DataCount 256 Iterations: 1000 Average: 0,803 ticks
CacheFullLockAdd DataCount 256 Iterations: 1000 Average: 0,19 ticks
CacheFullLockGet DataCount 256 Iterations: 1000 Average: 0,233 ticks
CacheFullLockSearch DataCount 256 Iterations: 1000 Average: 5,104 ticks
CacheFullLockClear DataCount 256 Iterations: 1000 Average: 0,915 ticks
CacheFullLockIxAdd DataCount 256 Iterations: 1000 Average: 0,26 ticks
CacheFullLockIxGet DataCount 256 Iterations: 1000 Average: 0,231 ticks
CacheFullLockIxSearch DataCount 256 Iterations: 1000 Average: 0,312 ticks
CacheFullLockIxClear DataCount 256 Iterations: 1000 Average: 1,789 ticks
CacheWriteLockAdd DataCount 256 Iterations: 1000 Average: 0,293 ticks
CacheWriteLockGet DataCount 256 Iterations: 1000 Average: 0,374 ticks
CacheWriteLockSearch DataCount 256 Iterations: 1000 Average: 5,282 ticks
CacheWriteLockClear DataCount 256 Iterations: 1000 Average: 0,976 ticks
CacheConcurrentAdd DataCount 256 Iterations: 1000 Average: 1,534 ticks
CacheConcurrentGet DataCount 256 Iterations: 1000 Average: 0,235 ticks
CacheConcurrentSearch DataCount 256 Iterations: 1000 Average: 52,51 ticks
CacheConcurrentClear DataCount 256 Iterations: 1000 Average: 45,32 ticks
CacheUnsafeAdd DataCount 512 Iterations: 1000 Average: 0,136 ticks
CacheUnsafeGet DataCount 512 Iterations: 1000 Average: 0,175 ticks
CacheUnsafeSearch DataCount 512 Iterations: 1000 Average: 9,784 ticks
CacheUnsafeClear DataCount 512 Iterations: 1000 Average: 1,377 ticks
CacheFullLockAdd DataCount 512 Iterations: 1000 Average: 0,208 ticks
CacheFullLockGet DataCount 512 Iterations: 1000 Average: 0,235 ticks
CacheFullLockSearch DataCount 512 Iterations: 1000 Average: 9,817 ticks
CacheFullLockClear DataCount 512 Iterations: 1000 Average: 1,663 ticks
CacheFullLockIxAdd DataCount 512 Iterations: 1000 Average: 0,265 ticks
CacheFullLockIxGet DataCount 512 Iterations: 1000 Average: 0,234 ticks
CacheFullLockIxSearch DataCount 512 Iterations: 1000 Average: 0,31 ticks
CacheFullLockIxClear DataCount 512 Iterations: 1000 Average: 3,482 ticks
CacheWriteLockAdd DataCount 512 Iterations: 1000 Average: 0,297 ticks
CacheWriteLockGet DataCount 512 Iterations: 1000 Average: 0,371 ticks
CacheWriteLockSearch DataCount 512 Iterations: 1000 Average: 9,889 ticks
CacheWriteLockClear DataCount 512 Iterations: 1000 Average: 1,774 ticks
CacheConcurrentAdd DataCount 512 Iterations: 1000 Average: 1,214 ticks
CacheConcurrentGet DataCount 512 Iterations: 1000 Average: 0,233 ticks
CacheConcurrentSearch DataCount 512 Iterations: 1000 Average: 58,012 ticks
CacheConcurrentClear DataCount 512 Iterations: 1000 Average: 44,27 ticks
CacheUnsafeAdd DataCount 1024 Iterations: 1000 Average: 0,147 ticks
CacheUnsafeGet DataCount 1024 Iterations: 1000 Average: 0,186 ticks
CacheUnsafeSearch DataCount 1024 Iterations: 1000 Average: 19,618 ticks
CacheUnsafeClear DataCount 1024 Iterations: 1000 Average: 3,47 ticks
CacheFullLockAdd DataCount 1024 Iterations: 1000 Average: 0,213 ticks
CacheFullLockGet DataCount 1024 Iterations: 1000 Average: 0,238 ticks
CacheFullLockSearch DataCount 1024 Iterations: 1000 Average: 19,128 ticks
CacheFullLockClear DataCount 1024 Iterations: 1000 Average: 3,541 ticks
CacheFullLockIxAdd DataCount 1024 Iterations: 1000 Average: 0,258 ticks
CacheFullLockIxGet DataCount 1024 Iterations: 1000 Average: 0,23 ticks
CacheFullLockIxSearch DataCount 1024 Iterations: 1000 Average: 0,307 ticks
CacheFullLockIxClear DataCount 1024 Iterations: 1000 Average: 6,754 ticks
CacheWriteLockAdd DataCount 1024 Iterations: 1000 Average: 0,307 ticks
CacheWriteLockGet DataCount 1024 Iterations: 1000 Average: 0,378 ticks
CacheWriteLockSearch DataCount 1024 Iterations: 1000 Average: 19,413 ticks
CacheWriteLockClear DataCount 1024 Iterations: 1000 Average: 3,584 ticks
CacheConcurrentAdd DataCount 1024 Iterations: 1000 Average: 0,933 ticks
CacheConcurrentGet DataCount 1024 Iterations: 1000 Average: 0,233 ticks
CacheConcurrentSearch DataCount 1024 Iterations: 1000 Average: 77,34 ticks
CacheConcurrentClear DataCount 1024 Iterations: 1000 Average: 45,052 ticks
CacheUnsafeAdd DataCount 2048 Iterations: 1000 Average: 0,139 ticks
CacheUnsafeGet DataCount 2048 Iterations: 1000 Average: 0,18 ticks
CacheUnsafeSearch DataCount 2048 Iterations: 1000 Average: 37,257 ticks
CacheUnsafeClear DataCount 2048 Iterations: 1000 Average: 6,617 ticks
CacheFullLockAdd DataCount 2048 Iterations: 1000 Average: 0,216 ticks
CacheFullLockGet DataCount 2048 Iterations: 1000 Average: 0,24 ticks
CacheFullLockSearch DataCount 2048 Iterations: 1000 Average: 37,24 ticks
CacheFullLockClear DataCount 2048 Iterations: 1000 Average: 6,759 ticks
CacheFullLockIxAdd DataCount 2048 Iterations: 1000 Average: 0,259 ticks
CacheFullLockIxGet DataCount 2048 Iterations: 1000 Average: 0,231 ticks
CacheFullLockIxSearch DataCount 2048 Iterations: 1000 Average: 0,31 ticks
CacheFullLockIxClear DataCount 2048 Iterations: 1000 Average: 12,961 ticks
CacheWriteLockAdd DataCount 2048 Iterations: 1000 Average: 0,313 ticks
CacheWriteLockGet DataCount 2048 Iterations: 1000 Average: 0,38 ticks
CacheWriteLockSearch DataCount 2048 Iterations: 1000 Average: 37,501 ticks
CacheWriteLockClear DataCount 2048 Iterations: 1000 Average: 6,127 ticks
CacheConcurrentAdd DataCount 2048 Iterations: 1000 Average: 0,87 ticks
CacheConcurrentGet DataCount 2048 Iterations: 1000 Average: 0,235 ticks
CacheConcurrentSearch DataCount 2048 Iterations: 1000 Average: 112,173 ticks
CacheConcurrentClear DataCount 2048 Iterations: 1000 Average: 44,945 ticks
CacheUnsafeAdd DataCount 4096 Iterations: 1000 Average: 0,146 ticks
CacheUnsafeGet DataCount 4096 Iterations: 1000 Average: 0,18 ticks
CacheUnsafeSearch DataCount 4096 Iterations: 1000 Average: 73,893 ticks
CacheUnsafeClear DataCount 4096 Iterations: 1000 Average: 13,552 ticks
CacheFullLockAdd DataCount 4096 Iterations: 1000 Average: 0,231 ticks
CacheFullLockGet DataCount 4096 Iterations: 1000 Average: 0,238 ticks
CacheFullLockSearch DataCount 4096 Iterations: 1000 Average: 73,968 ticks
CacheFullLockClear DataCount 4096 Iterations: 1000 Average: 13,778 ticks
CacheFullLockIxAdd DataCount 4096 Iterations: 1000 Average: 0,267 ticks
CacheFullLockIxGet DataCount 4096 Iterations: 1000 Average: 0,229 ticks
CacheFullLockIxSearch DataCount 4096 Iterations: 1000 Average: 0,306 ticks
CacheFullLockIxClear DataCount 4096 Iterations: 1000 Average: 28,183 ticks
CacheWriteLockAdd DataCount 4096 Iterations: 1000 Average: 0,328 ticks
CacheWriteLockGet DataCount 4096 Iterations: 1000 Average: 0,378 ticks
CacheWriteLockSearch DataCount 4096 Iterations: 1000 Average: 74,292 ticks
CacheWriteLockClear DataCount 4096 Iterations: 1000 Average: 13,97 ticks
CacheConcurrentAdd DataCount 4096 Iterations: 1000 Average: 0,784 ticks
CacheConcurrentGet DataCount 4096 Iterations: 1000 Average: 0,237 ticks
CacheConcurrentSearch DataCount 4096 Iterations: 1000 Average: 192,573 ticks
CacheConcurrentClear DataCount 4096 Iterations: 1000 Average: 56,879 ticks
CacheUnsafeAdd DataCount 8192 Iterations: 1000 Average: 0,179 ticks
CacheUnsafeGet DataCount 8192 Iterations: 1000 Average: 0,179 ticks
CacheUnsafeSearch DataCount 8192 Iterations: 1000 Average: 147,167 ticks
CacheUnsafeClear DataCount 8192 Iterations: 1000 Average: 19,92 ticks
CacheFullLockAdd DataCount 8192 Iterations: 1000 Average: 0,29 ticks
CacheFullLockGet DataCount 8192 Iterations: 1000 Average: 0,263 ticks
CacheFullLockSearch DataCount 8192 Iterations: 1000 Average: 155,426 ticks
CacheFullLockClear DataCount 8192 Iterations: 1000 Average: 20,904 ticks
CacheFullLockIxAdd DataCount 8192 Iterations: 1000 Average: 0,32 ticks
CacheFullLockIxGet DataCount 8192 Iterations: 1000 Average: 0,25 ticks
CacheFullLockIxSearch DataCount 8192 Iterations: 1000 Average: 0,338 ticks
CacheFullLockIxClear DataCount 8192 Iterations: 1000 Average: 46,742 ticks
CacheWriteLockAdd DataCount 8192 Iterations: 1000 Average: 0,391 ticks
CacheWriteLockGet DataCount 8192 Iterations: 1000 Average: 0,413 ticks
CacheWriteLockSearch DataCount 8192 Iterations: 1000 Average: 157,023 ticks
CacheWriteLockClear DataCount 8192 Iterations: 1000 Average: 21,709 ticks
CacheConcurrentAdd DataCount 8192 Iterations: 1000 Average: 0,836 ticks
CacheConcurrentGet DataCount 8192 Iterations: 1000 Average: 0,266 ticks
CacheConcurrentSearch DataCount 8192 Iterations: 1000 Average: 377,017 ticks
CacheConcurrentClear DataCount 8192 Iterations: 1000 Average: 48,153 ticks


Results, multi-threaded

CacheUnsafeFail DataCount - Iterations: - Failed Collection was modified; enumeration operation may not execute.
CacheFullLockGets DataCount 256 Iterations: 1000 Average: 22426 gets
CacheFullLockSearch DataCount 256 Iterations: 1000 Average: 27437 searches
CacheFullLockWrites DataCount 256 Iterations: 1000 Average: 396 writes
CacheFullLockIxGets DataCount 256 Iterations: 1000 Average: 170105 gets
CacheFullLockIxSearch DataCount 256 Iterations: 1000 Average: 153597 searches
CacheFullLockIxWrites DataCount 256 Iterations: 1000 Average: 1799 writes
CacheWriteLockGets DataCount 256 Iterations: 1000 Average: 126810 gets
CacheWriteLockSearch DataCount 256 Iterations: 1000 Average: 16548 searches
CacheWriteLockWrites DataCount 256 Iterations: 1000 Average: 1737 writes
CacheConcurrentGets DataCount 256 Iterations: 1000 Average: 342192 gets
CacheConcurrentSearch DataCount 256 Iterations: 1000 Average: 853 searches
CacheConcurrentWrites DataCount 256 Iterations: 1000 Average: 1518 writes




No comments:

Post a Comment