Skip to content

Conversation

@bitfaster
Copy link
Owner

@bitfaster bitfaster commented Nov 17, 2023

Need to verify whether this has regressed perf. Bench run below showed FastConcurrentTLru is slower than FastConcLruAfterAccess, which was not previously the case. But overall numbers are higher than when I last ran, need to repeat on a clean state.

Method Runtime Mean Error StdDev Ratio Code Size Allocated
ConcurrentDictionary .NET 6.0 7.291 ns 0.0439 ns 0.0389 ns 1.00 1,523 B -
FastConcurrentLru .NET 6.0 8.399 ns 0.1118 ns 0.1046 ns 1.15 7,047 B -
ConcurrentLru .NET 6.0 14.659 ns 0.0586 ns 0.0520 ns 2.01 7,294 B -
AtomicFastLru .NET 6.0 19.814 ns 0.0420 ns 0.0393 ns 2.72 NA -
FastConcurrentTLru .NET 6.0 11.609 ns 0.0224 ns 0.0209 ns 1.59 7,190 B -
FastConcLruAfterAccess .NET 6.0 11.232 ns 0.0493 ns 0.0385 ns 1.54 6,342 B -
FastConcLruAfter .NET 6.0 13.695 ns 0.1964 ns 0.1837 ns 1.88 7,683 B -
ConcurrentTLru .NET 6.0 16.209 ns 0.0257 ns 0.0228 ns 2.22 7,705 B -
ConcurrentLfu .NET 6.0 30.495 ns 1.1803 ns 3.4803 ns 4.28 NA -
ClassicLru .NET 6.0 43.279 ns 0.0622 ns 0.0486 ns 5.94 NA -
RuntimeMemoryCacheGet .NET 6.0 110.979 ns 0.3277 ns 0.3065 ns 15.22 49 B 32 B
ExtensionsMemoryCacheGet .NET 6.0 50.261 ns 0.9936 ns 1.0632 ns 6.87 78 B 24 B
ConcurrentDictionary .NET Framework 4.8 13.515 ns 0.0456 ns 0.0427 ns 1.00 4,127 B -
FastConcurrentLru .NET Framework 4.8 15.121 ns 0.0663 ns 0.0620 ns 1.12 27,372 B -
ConcurrentLru .NET Framework 4.8 19.176 ns 0.2836 ns 0.2514 ns 1.42 27,676 B -
AtomicFastLru .NET Framework 4.8 30.766 ns 0.0454 ns 0.0403 ns 2.28 358 B -
FastConcurrentTLru .NET Framework 4.8 48.792 ns 0.1256 ns 0.1175 ns 3.61 27,664 B -
FastConcLruAfterAccess .NET Framework 4.8 45.270 ns 0.0731 ns 0.0648 ns 3.35 358 B -
FastConcLruAfter .NET Framework 4.8 46.741 ns 0.0260 ns 0.0203 ns 3.46 358 B -
ConcurrentTLru .NET Framework 4.8 47.776 ns 0.0980 ns 0.0869 ns 3.53 28,016 B -
ConcurrentLfu .NET Framework 4.8 56.767 ns 0.5338 ns 0.4994 ns 4.20 NA -
ClassicLru .NET Framework 4.8 55.115 ns 0.1339 ns 0.1187 ns 4.08 NA -
RuntimeMemoryCacheGet .NET Framework 4.8 285.584 ns 1.2160 ns 1.0780 ns 21.13 33 B 32 B
ExtensionsMemoryCacheGet .NET Framework 4.8 91.806 ns 1.8453 ns 1.9745 ns 6.77 82 B 24 B

@coveralls
Copy link

coveralls commented Nov 17, 2023

Coverage Status

coverage: 98.661% (+0.001%) from 98.66%
when pulling 4a2096c on users/alexpeck/tlruduration
into 56f9f24 on main.

@bitfaster
Copy link
Owner Author

Cleaner run:

Method Runtime Mean Error StdDev Ratio Code Size Allocated
ConcurrentDictionary .NET 6.0 7.624 ns 0.0807 ns 0.0674 ns 1.00 1,523 B -
FastConcurrentLru .NET 6.0 8.746 ns 0.0453 ns 0.0424 ns 1.15 4,437 B -
ConcurrentLru .NET 6.0 16.628 ns 0.1459 ns 0.1364 ns 2.18 4,684 B -
FastConcurrentTLru .NET 6.0 11.568 ns 0.0502 ns 0.0419 ns 1.52 4,580 B -
FastConcLruAfterAccess .NET 6.0 11.842 ns 0.0899 ns 0.0797 ns 1.55 5,256 B -
FastConcLruAfter .NET 6.0 13.227 ns 0.0509 ns 0.0398 ns 1.74 5,073 B -
ConcurrentTLru .NET 6.0 16.156 ns 0.0528 ns 0.0440 ns 2.12 5,095 B -
ConcurrentDictionary .NET Framework 4.8 14.865 ns 0.0886 ns 0.0785 ns 1.00 4,127 B -
FastConcurrentLru .NET Framework 4.8 15.880 ns 0.0892 ns 0.0790 ns 1.07 27,372 B -
ConcurrentLru .NET Framework 4.8 19.217 ns 0.1467 ns 0.1372 ns 1.29 27,676 B -
FastConcurrentTLru .NET Framework 4.8 46.152 ns 0.1685 ns 0.1407 ns 3.10 27,664 B -
FastConcLruAfterAccess .NET Framework 4.8 45.317 ns 0.1274 ns 0.1129 ns 3.05 358 B -
FastConcLruAfter .NET Framework 4.8 46.978 ns 0.2021 ns 0.1890 ns 3.16 358 B -
ConcurrentTLru .NET Framework 4.8 48.268 ns 0.8492 ns 0.7091 ns 3.25 28,016 B -

Comparable to results here #438

Method Runtime Mean Error StdDev Ratio Code Size Allocated
ConcurrentDictionary .NET 6.0 7.316 ns 0.1773 ns 0.2111 ns 1.00 1,523 B -
FastConcurrentLru .NET 6.0 9.257 ns 0.2104 ns 0.2583 ns 1.27 7,235 B -
ConcurrentLru .NET 6.0 15.503 ns 0.3292 ns 0.3522 ns 2.12 7,482 B -
FastConcurrentTLru .NET 6.0 11.973 ns 0.1564 ns 0.1387 ns 1.63 6,394 B -
ConcurrentTLru .NET 6.0 16.881 ns 0.3086 ns 0.2577 ns 2.31 7,912 B -
ConcurrentDictionary .NET Framework 4.8 14.423 ns 0.3010 ns 0.3091 ns 1.00 4,127 B -
FastConcurrentLru .NET Framework 4.8 15.579 ns 0.3166 ns 0.2962 ns 1.08 23,882 B -
ConcurrentLru .NET Framework 4.8 21.279 ns 0.3536 ns 0.3307 ns 1.48 24,186 B -
FastConcurrentTLru .NET Framework 4.8 48.056 ns 0.8575 ns 0.9875 ns 3.33 24,154 B -
ConcurrentTLru .NET Framework 4.8 49.802 ns 0.5524 ns 0.4897 ns 3.46 24,506 B -

@bitfaster bitfaster merged commit 683c036 into main Nov 17, 2023
@bitfaster bitfaster deleted the users/alexpeck/tlruduration branch November 17, 2023 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants