Skip to content

kpango/go-cache-lib-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-cache-lib-benchmarks

Go's cache libraries benchmarking

Benchmark Results

go test -count=3 -run=NONE -bench . -benchmem
goos: linux
goarch: amd64
pkg: github.com/kpango/go-cache-lib-benchmarks
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
BenchmarkDefaultMapSetSmallDataNoTTL-16     	 1469264	      997.4 ns/op	       9 B/op	       0 allocs/op
BenchmarkDefaultMapSetSmallDataNoTTL-16     	 3285390	      910.7 ns/op	       4 B/op	       0 allocs/op
BenchmarkDefaultMapSetSmallDataNoTTL-16     	 3220872	      887.4 ns/op	       4 B/op	       0 allocs/op
BenchmarkDefaultMapSetBigDataNoTTL-16       	     856	    1439063 ns/op	   15060 B/op	     375 allocs/op
BenchmarkDefaultMapSetBigDataNoTTL-16       	    1107	    1290329 ns/op	   11662 B/op	     290 allocs/op
BenchmarkDefaultMapSetBigDataNoTTL-16       	    1051	    1507823 ns/op	   12275 B/op	     306 allocs/op
BenchmarkSyncMapSetSmallDataNoTTL-16        	 6322310	      231.5 ns/op	     194 B/op	      12 allocs/op
BenchmarkSyncMapSetSmallDataNoTTL-16        	 4918752	      228.7 ns/op	     194 B/op	      12 allocs/op
BenchmarkSyncMapSetSmallDataNoTTL-16        	 4603812	      271.1 ns/op	     195 B/op	      12 allocs/op
BenchmarkSyncMapSetBigDataNoTTL-16          	    2088	     637001 ns/op	  104660 B/op	    6300 allocs/op
BenchmarkSyncMapSetBigDataNoTTL-16          	    1706	     631394 ns/op	  106058 B/op	    6335 allocs/op
BenchmarkSyncMapSetBigDataNoTTL-16          	    1872	     597286 ns/op	  105391 B/op	    6318 allocs/op
BenchmarkGacheV2SetSmallDataNoTTL-16        	 5839593	      189.0 ns/op	      98 B/op	       4 allocs/op
BenchmarkGacheV2SetSmallDataNoTTL-16        	 5403675	      193.4 ns/op	      98 B/op	       4 allocs/op
BenchmarkGacheV2SetSmallDataNoTTL-16        	 5560083	      187.7 ns/op	      99 B/op	       4 allocs/op
BenchmarkGacheV2SetSmallDataWithTTL-16      	 6647318	      186.1 ns/op	      98 B/op	       4 allocs/op
BenchmarkGacheV2SetSmallDataWithTTL-16      	 5257988	      193.5 ns/op	      98 B/op	       4 allocs/op
BenchmarkGacheV2SetSmallDataWithTTL-16      	 5193996	      193.7 ns/op	      98 B/op	       4 allocs/op
BenchmarkGacheV2SetBigDataNoTTL-16          	    8611	     143677 ns/op	   50736 B/op	    2086 allocs/op
BenchmarkGacheV2SetBigDataNoTTL-16          	    8508	     140852 ns/op	   50760 B/op	    2086 allocs/op
BenchmarkGacheV2SetBigDataNoTTL-16          	    8476	     140188 ns/op	   50721 B/op	    2086 allocs/op
BenchmarkGacheV2SetBigDataWithTTL-16        	    7513	     133847 ns/op	   50979 B/op	    2092 allocs/op
BenchmarkGacheV2SetBigDataWithTTL-16        	    8626	     134839 ns/op	   50726 B/op	    2086 allocs/op
BenchmarkGacheV2SetBigDataWithTTL-16        	    8865	     136431 ns/op	   50695 B/op	    2085 allocs/op
BenchmarkGacheSetSmallDataNoTTL-16          	 4167685	      250.7 ns/op	     163 B/op	       8 allocs/op
BenchmarkGacheSetSmallDataNoTTL-16          	 4785205	      226.0 ns/op	     162 B/op	       8 allocs/op
BenchmarkGacheSetSmallDataNoTTL-16          	 4468771	      288.0 ns/op	     163 B/op	       8 allocs/op
BenchmarkGacheSetSmallDataWithTTL-16        	 4134656	      256.6 ns/op	     163 B/op	       8 allocs/op
BenchmarkGacheSetSmallDataWithTTL-16        	 3769148	      286.9 ns/op	     163 B/op	       8 allocs/op
BenchmarkGacheSetSmallDataWithTTL-16        	 3972660	      263.6 ns/op	     163 B/op	       8 allocs/op
BenchmarkGacheSetBigDataNoTTL-16            	    6706	     159275 ns/op	   83956 B/op	    4145 allocs/op
BenchmarkGacheSetBigDataNoTTL-16            	    7540	     160175 ns/op	   83680 B/op	    4139 allocs/op
BenchmarkGacheSetBigDataNoTTL-16            	    6684	     161834 ns/op	   84003 B/op	    4146 allocs/op
BenchmarkGacheSetBigDataWithTTL-16          	    6500	     155505 ns/op	   84013 B/op	    4147 allocs/op
BenchmarkGacheSetBigDataWithTTL-16          	    7886	     153134 ns/op	   83623 B/op	    4137 allocs/op
BenchmarkGacheSetBigDataWithTTL-16          	    7045	     152857 ns/op	   83892 B/op	    4143 allocs/op
BenchmarkTTLCacheSetSmallDataNoTTL-16       	  708048	       1611 ns/op	     211 B/op	       4 allocs/op
BenchmarkTTLCacheSetSmallDataNoTTL-16       	  606050	       1752 ns/op	     214 B/op	       4 allocs/op
BenchmarkTTLCacheSetSmallDataNoTTL-16       	  814436	       1646 ns/op	     209 B/op	       4 allocs/op
BenchmarkTTLCacheSetSmallDataWithTTL-16     	  367594	       4876 ns/op	     230 B/op	       4 allocs/op
BenchmarkTTLCacheSetSmallDataWithTTL-16     	  370612	       5213 ns/op	     229 B/op	       4 allocs/op
BenchmarkTTLCacheSetSmallDataWithTTL-16     	  288400	       3949 ns/op	     240 B/op	       5 allocs/op
BenchmarkTTLCacheSetBigDataNoTTL-16         	     768	    2250422 ns/op	  115877 B/op	    2472 allocs/op
BenchmarkTTLCacheSetBigDataNoTTL-16         	     998	    1856747 ns/op	  111887 B/op	    2375 allocs/op
BenchmarkTTLCacheSetBigDataNoTTL-16         	     988	    1907062 ns/op	  112001 B/op	    2378 allocs/op
BenchmarkTTLCacheSetBigDataWithTTL-16       	     624	    4234263 ns/op	  119964 B/op	    2571 allocs/op
BenchmarkTTLCacheSetBigDataWithTTL-16       	     566	    4149254 ns/op	  122189 B/op	    2624 allocs/op
BenchmarkTTLCacheSetBigDataWithTTL-16       	     639	    3848022 ns/op	  119504 B/op	    2559 allocs/op
BenchmarkGoCacheSetSmallDataNoTTL-16        	 2363812	       1755 ns/op	      69 B/op	       4 allocs/op
BenchmarkGoCacheSetSmallDataNoTTL-16        	 1197451	       1239 ns/op	      75 B/op	       4 allocs/op
BenchmarkGoCacheSetSmallDataNoTTL-16        	 1267500	       1542 ns/op	      75 B/op	       4 allocs/op
BenchmarkGoCacheSetSmallDataWithTTL-16      	  689509	       1812 ns/op	      84 B/op	       4 allocs/op
BenchmarkGoCacheSetSmallDataWithTTL-16      	  608974	       2334 ns/op	      86 B/op	       4 allocs/op
BenchmarkGoCacheSetSmallDataWithTTL-16      	  670018	       1886 ns/op	      84 B/op	       4 allocs/op
BenchmarkGoCacheSetBigDataNoTTL-16          	     630	    1989807 ns/op	   53848 B/op	    2558 allocs/op
BenchmarkGoCacheSetBigDataNoTTL-16          	     705	    2029140 ns/op	   51643 B/op	    2504 allocs/op
BenchmarkGoCacheSetBigDataNoTTL-16          	     790	    2399635 ns/op	   49599 B/op	    2455 allocs/op
BenchmarkGoCacheSetBigDataWithTTL-16        	     742	    1869869 ns/op	   50687 B/op	    2481 allocs/op
BenchmarkGoCacheSetBigDataWithTTL-16        	     705	    2169135 ns/op	   51626 B/op	    2504 allocs/op
BenchmarkGoCacheSetBigDataWithTTL-16        	     811	    2432933 ns/op	   49173 B/op	    2444 allocs/op
BenchmarkBigCacheSetSmallDataNoTTL-16       	  684067	       2060 ns/op	     282 B/op	       8 allocs/op
BenchmarkBigCacheSetSmallDataNoTTL-16       	  670004	       1800 ns/op	     343 B/op	       8 allocs/op
BenchmarkBigCacheSetSmallDataNoTTL-16       	  677294	       1950 ns/op	     257 B/op	       8 allocs/op
BenchmarkBigCacheSetSmallDataWithTTL-16     	  675710	       1815 ns/op	     341 B/op	       8 allocs/op
BenchmarkBigCacheSetSmallDataWithTTL-16     	  528177	       1948 ns/op	     316 B/op	       8 allocs/op
BenchmarkBigCacheSetSmallDataWithTTL-16     	  653791	       1820 ns/op	     293 B/op	       8 allocs/op
BenchmarkBigCacheSetBigDataNoTTL-16         	     159	    6624225 ns/op	22794908 B/op	    8175 allocs/op
BenchmarkBigCacheSetBigDataNoTTL-16         	     453	    6379053 ns/op	22970362 B/op	    6839 allocs/op
BenchmarkBigCacheSetBigDataNoTTL-16         	     400	    6399471 ns/op	24317744 B/op	    6956 allocs/op
BenchmarkBigCacheSetBigDataWithTTL-16       	     374	    6191126 ns/op	26072534 B/op	    7012 allocs/op
BenchmarkBigCacheSetBigDataWithTTL-16       	     391	    6044775 ns/op	24995056 B/op	    6975 allocs/op
BenchmarkBigCacheSetBigDataWithTTL-16       	     399	    5903688 ns/op	24746230 B/op	    6958 allocs/op
BenchmarkFastCacheSetSmallDataNoTTL-16      	  886015	       1413 ns/op	      55 B/op	       4 allocs/op
BenchmarkFastCacheSetSmallDataNoTTL-16      	  870694	       1352 ns/op	      56 B/op	       4 allocs/op
BenchmarkFastCacheSetSmallDataNoTTL-16      	  914353	       1602 ns/op	      55 B/op	       4 allocs/op
BenchmarkFastCacheSetBigDataNoTTL-16        	     523	    3062973 ns/op	12630167 B/op	    8158 allocs/op
BenchmarkFastCacheSetBigDataNoTTL-16        	     506	    2859736 ns/op	12630530 B/op	    8146 allocs/op
BenchmarkFastCacheSetBigDataNoTTL-16        	     499	    2942921 ns/op	12631493 B/op	    8194 allocs/op
BenchmarkFreeCacheSetSmallDataNoTTL-16      	  907856	       1246 ns/op	     137 B/op	       8 allocs/op
BenchmarkFreeCacheSetSmallDataNoTTL-16      	  944091	       1289 ns/op	     139 B/op	       8 allocs/op
BenchmarkFreeCacheSetSmallDataNoTTL-16      	  849830	       1342 ns/op	     138 B/op	       8 allocs/op
BenchmarkFreeCacheSetSmallDataWithTTL-16    	  834114	       1388 ns/op	     139 B/op	       8 allocs/op
BenchmarkFreeCacheSetSmallDataWithTTL-16    	  921373	       1431 ns/op	     137 B/op	       8 allocs/op
BenchmarkFreeCacheSetSmallDataWithTTL-16    	  931282	       1301 ns/op	     137 B/op	       8 allocs/op
BenchmarkFreeCacheSetBigDataNoTTL-16        	     453	    5064385 ns/op	16855327 B/op	   10949 allocs/op
BenchmarkFreeCacheSetBigDataNoTTL-16        	     513	    4004331 ns/op	16851934 B/op	   10866 allocs/op
BenchmarkFreeCacheSetBigDataNoTTL-16        	     504	    4154207 ns/op	16852415 B/op	   10877 allocs/op
BenchmarkFreeCacheSetBigDataWithTTL-16      	     477	    4016187 ns/op	16811739 B/op	   10875 allocs/op
BenchmarkFreeCacheSetBigDataWithTTL-16      	     523	    4192427 ns/op	16685501 B/op	   10698 allocs/op
BenchmarkFreeCacheSetBigDataWithTTL-16      	     516	    4094385 ns/op	16556333 B/op	   10581 allocs/op
BenchmarkGCacheLRUSetSmallDataNoTTL-16      	  366608	       4398 ns/op	     738 B/op	      24 allocs/op
BenchmarkGCacheLRUSetSmallDataNoTTL-16      	  386276	       4530 ns/op	     732 B/op	      24 allocs/op
BenchmarkGCacheLRUSetSmallDataNoTTL-16      	  426148	       4184 ns/op	     730 B/op	      24 allocs/op
BenchmarkGCacheLRUSetSmallDataWithTTL-16    	  484747	       2965 ns/op	     316 B/op	      16 allocs/op
BenchmarkGCacheLRUSetSmallDataWithTTL-16    	  474223	       3302 ns/op	     317 B/op	      16 allocs/op
BenchmarkGCacheLRUSetSmallDataWithTTL-16    	  455833	       2961 ns/op	     318 B/op	      16 allocs/op
BenchmarkGCacheLRUSetBigDataNoTTL-16        	     598	    4586010 ns/op	  409423 B/op	   12852 allocs/op
BenchmarkGCacheLRUSetBigDataNoTTL-16        	     604	    3597852 ns/op	  408744 B/op	   12845 allocs/op
BenchmarkGCacheLRUSetBigDataNoTTL-16        	     586	    4350830 ns/op	  409864 B/op	   12863 allocs/op
BenchmarkGCacheLRUSetBigDataWithTTL-16      	     571	    3358428 ns/op	  409399 B/op	   12874 allocs/op
BenchmarkGCacheLRUSetBigDataWithTTL-16      	     594	    3801168 ns/op	  410085 B/op	   12857 allocs/op
BenchmarkGCacheLRUSetBigDataWithTTL-16      	     576	    3546165 ns/op	  410145 B/op	   12873 allocs/op
BenchmarkGCacheLFUSetSmallDataNoTTL-16      	  437350	       4308 ns/op	     553 B/op	      20 allocs/op
BenchmarkGCacheLFUSetSmallDataNoTTL-16      	  420069	       4806 ns/op	     552 B/op	      20 allocs/op
BenchmarkGCacheLFUSetSmallDataNoTTL-16      	  435663	       5627 ns/op	     550 B/op	      20 allocs/op
BenchmarkGCacheLFUSetSmallDataWithTTL-16    	  473734	       3126 ns/op	     317 B/op	      16 allocs/op
BenchmarkGCacheLFUSetSmallDataWithTTL-16    	  479011	       3197 ns/op	     317 B/op	      16 allocs/op
BenchmarkGCacheLFUSetSmallDataWithTTL-16    	  447433	       3263 ns/op	     319 B/op	      16 allocs/op
BenchmarkGCacheLFUSetBigDataNoTTL-16        	     549	    3620129 ns/op	  312066 B/op	   10870 allocs/op
BenchmarkGCacheLFUSetBigDataNoTTL-16        	     548	    4152551 ns/op	  311993 B/op	   10871 allocs/op
BenchmarkGCacheLFUSetBigDataNoTTL-16        	     466	    4333646 ns/op	  316119 B/op	   10973 allocs/op
BenchmarkGCacheLFUSetBigDataWithTTL-16      	     542	    3383455 ns/op	  305377 B/op	   10841 allocs/op
BenchmarkGCacheLFUSetBigDataWithTTL-16      	     538	    4692633 ns/op	  307179 B/op	   10855 allocs/op
BenchmarkGCacheLFUSetBigDataWithTTL-16      	     530	    3566308 ns/op	  306071 B/op	   10858 allocs/op
BenchmarkGCacheARCSetSmallDataNoTTL-16      	  338374	       7514 ns/op	     930 B/op	      28 allocs/op
BenchmarkGCacheARCSetSmallDataNoTTL-16      	  321838	       8817 ns/op	     929 B/op	      28 allocs/op
BenchmarkGCacheARCSetSmallDataNoTTL-16      	  311808	       8814 ns/op	     930 B/op	      28 allocs/op
BenchmarkGCacheARCSetSmallDataWithTTL-16    	  444771	       3239 ns/op	     319 B/op	      16 allocs/op
BenchmarkGCacheARCSetSmallDataWithTTL-16    	  472202	       3993 ns/op	     317 B/op	      16 allocs/op
BenchmarkGCacheARCSetSmallDataWithTTL-16    	  449200	       3546 ns/op	     319 B/op	      16 allocs/op
BenchmarkGCacheARCSetBigDataNoTTL-16        	     278	    8533520 ns/op	  503447 B/op	   14677 allocs/op
BenchmarkGCacheARCSetBigDataNoTTL-16        	     271	    6274098 ns/op	  506314 B/op	   14779 allocs/op
BenchmarkGCacheARCSetBigDataNoTTL-16        	     256	    6391304 ns/op	  515858 B/op	   14901 allocs/op
BenchmarkGCacheARCSetBigDataWithTTL-16      	     304	    7159431 ns/op	  482107 B/op	   14383 allocs/op
BenchmarkGCacheARCSetBigDataWithTTL-16      	     285	    8641893 ns/op	  490331 B/op	   14587 allocs/op
BenchmarkGCacheARCSetBigDataWithTTL-16      	     290	    4708142 ns/op	  498345 B/op	   14786 allocs/op
BenchmarkMCacheSetSmallDataNoTTL-16         	  178640	       7368 ns/op	    2406 B/op	      33 allocs/op
BenchmarkMCacheSetSmallDataNoTTL-16         	  174402	       7014 ns/op	    2396 B/op	      33 allocs/op
BenchmarkMCacheSetSmallDataNoTTL-16         	  178670	       7234 ns/op	    2429 B/op	      33 allocs/op
BenchmarkMCacheSetSmallDataWithTTL-16       	  138844	       7583 ns/op	    2163 B/op	      35 allocs/op
BenchmarkMCacheSetSmallDataWithTTL-16       	  138133	       7520 ns/op	    2155 B/op	      35 allocs/op
BenchmarkMCacheSetSmallDataWithTTL-16       	  141013	       7485 ns/op	    2152 B/op	      35 allocs/op
BenchmarkMCacheSetBigDataNoTTL-16           	     418	    4344731 ns/op	 1113775 B/op	   17152 allocs/op
BenchmarkMCacheSetBigDataNoTTL-16           	     416	    2676171 ns/op	 1047481 B/op	   17155 allocs/op
BenchmarkMCacheSetBigDataNoTTL-16           	     416	    3689005 ns/op	 1047525 B/op	   17156 allocs/op
BenchmarkMCacheSetBigDataWithTTL-16         	     338	    3797792 ns/op	 1100596 B/op	   17783 allocs/op
BenchmarkMCacheSetBigDataWithTTL-16         	     405	    3702457 ns/op	 1152160 B/op	   17544 allocs/op
BenchmarkMCacheSetBigDataWithTTL-16         	     412	    3336398 ns/op	 1082287 B/op	   17522 allocs/op
BenchmarkBitcaskSetSmallDataNoTTL-16        	   33420	      39070 ns/op	     871 B/op	      34 allocs/op
BenchmarkBitcaskSetSmallDataNoTTL-16        	   42202	      26318 ns/op	     776 B/op	      31 allocs/op
BenchmarkBitcaskSetSmallDataNoTTL-16        	   31585	      32798 ns/op	     893 B/op	      34 allocs/op
BenchmarkBitcaskSetBigDataNoTTL-16          	     517	    2379943 ns/op	12607679 B/op	    6763 allocs/op
BenchmarkBitcaskSetBigDataNoTTL-16          	     553	    2336656 ns/op	12606064 B/op	    6722 allocs/op
BenchmarkBitcaskSetBigDataNoTTL-16          	     523	    2182041 ns/op	12607398 B/op	    6756 allocs/op
PASS
ok  	github.com/kpango/go-cache-lib-benchmarks	321.109s

About

Go's cache libraries benchmarking

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published