Skip to content

Commit 1ba0e3f

Browse files
authored
Update README.md
1 parent 4ebc940 commit 1ba0e3f

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

README.md

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -165,35 +165,6 @@ FastConcurrentLru does not allocate and is approximately 10x faster than MemoryC
165165
| ClassicLru | 69.01 ns | 0.503 ns | 0.446 ns | 4.36 | - | - |
166166
| MemoryCache | 257.83 ns | 4.786 ns | 4.700 ns | 16.30 | 0.0153 | 32 B |
167167

168-
### Mixed workload
169-
170-
Tests 4 operations, 1 miss (adding the item), 2 hits then remove.
171-
172-
This test needs to be improved to provoke queue cycling.
173-
174-
| Method | Mean | Error | StdDev | Ratio | Gen 0 | Allocated |
175-
|--------------------- |-----------:|---------:|---------:|------:|-------:|----------:|
176-
| ConcurrentDictionary | 151.7 ns | 2.34 ns | 1.96 ns | 1.00 | 0.0381 | 80 B |
177-
| FastConcurrentLru | 369.2 ns | 7.29 ns | 7.16 ns | 2.44 | 0.0534 | 112 B |
178-
| ConcurrentLru | 373.6 ns | 2.97 ns | 2.64 ns | 2.46 | 0.0534 | 112 B |
179-
| FastConcurrentTlru | 838.6 ns | 11.49 ns | 13.68 ns | 5.53 | 0.0572 | 120 B |
180-
| ConcurrentTlru | 852.7 ns | 16.12 ns | 13.46 ns | 5.62 | 0.0572 | 120 B |
181-
| ClassicLru | 347.3 ns | 2.67 ns | 2.08 ns | 2.29 | 0.0763 | 160 B |
182-
| MemoryCache | 1,987.5 ns | 38.29 ns | 57.31 ns | 13.15 | 2.3460 | 4912 B |
183-
184-
185-
### LruCycle2
186-
187-
| Method | Mean | Error | StdDev | Ratio | Gen 0 | Allocated |
188-
|--------------------- |-----------:|---------:|---------:|------:|-------:|----------:|
189-
| ConcurrentDictionary | 111.0 ns | 1.60 ns | 1.33 ns | 1.00 | 0.0079 | 17 B |
190-
| FastConcurrentLru | 1,086.2 ns | 21.61 ns | 19.16 ns | 9.77 | 0.1424 | 300 B |
191-
| ConcurrentLru | 1,098.2 ns | 8.15 ns | 7.23 ns | 9.89 | 0.1424 | 300 B |
192-
| FastConcurrentTLru | 2,370.7 ns | 33.77 ns | 28.20 ns | 21.37 | 0.1577 | 333 B |
193-
| ConcurrentTLru | 2,419.7 ns | 46.90 ns | 52.13 ns | 21.82 | 0.1577 | 333 B |
194-
| ClassicLru | 834.3 ns | 10.84 ns | 9.61 ns | 7.52 | 0.2225 | 467 B |
195-
| MemoryCache | 1,572.9 ns | 30.94 ns | 44.37 ns | 14.14 | 0.1424 | 313 B |
196-
197168
## Meta-programming using structs for JIT dead code removal and inlining
198169

199170
TemplateConcurrentLru features injectable policies defined as structs. Since structs are subject to special JIT optimizations, the implementation is much faster than if these policies were defined as classes. Using this technique, 'Fast' versions without hit counting are within 30% of the speed of a ConcurrentDictionary.

0 commit comments

Comments
 (0)