Skip to content

Conversation

@bitfaster
Copy link
Owner

@bitfaster bitfaster commented Nov 23, 2023

Volatile read before try enter lock. This is slightly faster in the benchmark.

@coveralls
Copy link

coveralls commented Nov 23, 2023

Coverage Status

coverage: 99.157% (+0.1%) from 99.057%
when pulling 57ecc8e on users/alexpeck/volatile
into fcfd183 on main.

@bitfaster
Copy link
Owner Author

Method Runtime Mean Error StdDev Ratio Code Size Allocated
ConcurrentDictionary .NET 6.0 7.641 ns 0.0996 ns 0.0883 ns 1.00 1,523 B -
FastConcurrentLru .NET 6.0 9.401 ns 0.0196 ns 0.0164 ns 1.23 7,047 B -
ConcurrentLru .NET 6.0 14.806 ns 0.0686 ns 0.0642 ns 1.94 7,294 B -
AtomicFastLru .NET 6.0 20.827 ns 0.1498 ns 0.1251 ns 2.72 NA -
FastConcurrentTLru .NET 6.0 10.787 ns 0.0445 ns 0.0371 ns 1.41 7,190 B -
FastConcLruAfterAccess .NET 6.0 11.401 ns 0.0224 ns 0.0187 ns 1.49 7,596 B -
FastConcLruAfter .NET 6.0 13.062 ns 0.0392 ns 0.0348 ns 1.71 6,429 B -
ConcurrentTLru .NET 6.0 16.304 ns 0.0908 ns 0.0805 ns 2.13 7,705 B -
ConcurrentLfu .NET 6.0 23.732 ns 0.3340 ns 0.3124 ns 3.11 NA -
ClassicLru .NET 6.0 43.489 ns 0.1085 ns 0.0906 ns 5.69 NA -
RuntimeMemoryCacheGet .NET 6.0 123.112 ns 2.4499 ns 3.6670 ns 16.40 49 B 32 B
ExtensionsMemoryCacheGet .NET 6.0 57.915 ns 1.1798 ns 3.0665 ns 7.00 78 B 24 B
ConcurrentDictionary .NET Framework 4.8 13.464 ns 0.0610 ns 0.0541 ns 1.00 4,127 B -
FastConcurrentLru .NET Framework 4.8 14.947 ns 0.1641 ns 0.1535 ns 1.11 27,372 B -
ConcurrentLru .NET Framework 4.8 19.250 ns 0.1383 ns 0.1294 ns 1.43 27,676 B -
AtomicFastLru .NET Framework 4.8 32.326 ns 0.3353 ns 0.2972 ns 2.40 358 B -
FastConcurrentTLru .NET Framework 4.8 46.813 ns 0.7111 ns 0.6651 ns 3.48 27,664 B -
FastConcLruAfterAccess .NET Framework 4.8 45.892 ns 0.3912 ns 0.3660 ns 3.41 358 B -
FastConcLruAfter .NET Framework 4.8 47.184 ns 0.2052 ns 0.1819 ns 3.50 358 B -
ConcurrentTLru .NET Framework 4.8 48.380 ns 0.1636 ns 0.1450 ns 3.59 28,016 B -
ConcurrentLfu .NET Framework 4.8 40.882 ns 0.4661 ns 0.4132 ns 3.04 NA -
ClassicLru .NET Framework 4.8 50.470 ns 0.1725 ns 0.1529 ns 3.75 NA -
RuntimeMemoryCacheGet .NET Framework 4.8 286.450 ns 0.6913 ns 0.5772 ns 21.29 33 B 32 B

@bitfaster bitfaster marked this pull request as ready for review November 24, 2023 02:16
@bitfaster bitfaster changed the title Volatile read drain status Volatile read LFU drain status Nov 24, 2023
@bitfaster bitfaster merged commit 8bfee3d into main Nov 24, 2023
@bitfaster bitfaster deleted the users/alexpeck/volatile branch November 24, 2023 05:24
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