|
|
|
@ -72,20 +72,20 @@ Spoiler alert! The difference is insignificant.
|
|
|
|
|
|
|
|
|
|
| Test | [Non generic](https://github.com/patrickmn/go-cache)| | This version | |
|
|
|
|
|
|----------------------------------------------|-----------|-------------|-----------|---------------|
|
|
|
|
|
| BenchmarkCacheGetStringExpiring-8 | 29884011 | 41.45 ns/op | 28318041 | 43.31 ns/op |
|
|
|
|
|
| BenchmarkCacheGetStringNotExpiring-8 | 91891774 | 14.20 ns/op | 72259294 | 14.02 ns/op |
|
|
|
|
|
| BenchmarkCacheGetConcurrentExpiring-8 | 26299849 | 42.58 ns/op | 30129078 | 39.53 ns/op |
|
|
|
|
|
| BenchmarkCacheGetConcurrentNotExpiring-8 | 28991383 | 41.25 ns/op | 30760544 | 38.09 ns/op |
|
|
|
|
|
| BenchmarkCacheGetManyConcurrentExpiring-8 | 55589712 | 44.90 ns/op | 56991110 | 38.86 ns/op |
|
|
|
|
|
| BenchmarkCacheGetManyConcurrentNotExpiring-8 | 30105078 | 43.98 ns/op | 46270045 | 41.54 ns/op |
|
|
|
|
|
| BenchmarkCacheSetStringExpiring-8 | 18392893 | 63.41 ns/op | 17788724 | 61.42 ns/op |
|
|
|
|
|
| BenchmarkCacheSetStringNotExpiring-8 | 46400654 | 28.45 ns/op | 40226074 | 27.41 ns/op |
|
|
|
|
|
| BenchmarkCacheSetDelete-8 | 18703620 | 60.75 ns/op | 18270448 | 59.90 ns/op |
|
|
|
|
|
| BenchmarkCacheSetDeleteSingleLock-8 | 32633755 | 39.34 ns/op | 32415156 | 36.96 ns/op |
|
|
|
|
|
| BenchmarkCacheGetStructExpiring-8 | 30487856 | 41.60 ns/op | 26925226 | 40.55 ns/op |
|
|
|
|
|
| BenchmarkCacheGetStructNotExpiring-8 | 91921044 | 13.94 ns/op | 96379750 | 13.08 ns/op |
|
|
|
|
|
| BenchmarkCacheSetStructExpiring-8 | 13977464 | 86.44 ns/op | 13364509 | 87.69 ns/op |
|
|
|
|
|
| BenchmarkCacheSetStructNotExpiring-8 | 22749384 | 54.14 ns/op | 23207397 | 52.58 ns/op |
|
|
|
|
|
| BenchmarkCacheSetFatStructExpiring-8 | 11718718 | 103.3 ns/op | 12051895 | 102.3 ns/op |
|
|
|
|
|
| BenchmarkCacheGetFatStructNotExpiring-8 | 88695709 | 13.92 ns/op | 83220014 | 13.76 ns/op |
|
|
|
|
|
| <sub>BenchmarkCacheGetStringExpiring-8 </sub>| <sub>29884011</sub> | <sub>41.45 ns/op</sub> | <sub>28318041</sub> | <sub>43.31 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetStringNotExpiring-8 </sub>| <sub>91891774</sub> | <sub>14.20 ns/op</sub> | <sub>72259294</sub> | <sub>14.02 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetConcurrentExpiring-8 </sub>| <sub>26299849</sub> | <sub>42.58 ns/op</sub> | <sub>30129078</sub> | <sub>39.53 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetConcurrentNotExpiring-8 </sub>| <sub>28991383</sub> | <sub>41.25 ns/op</sub> | <sub>30760544</sub> | <sub>38.09 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetManyConcurrentExpiring-8 </sub>| <sub>55589712</sub> | <sub>44.90 ns/op</sub> | <sub>56991110</sub> | <sub>38.86 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetManyConcurrentNotExpiring-8 </sub>| <sub>30105078</sub> | <sub>43.98 ns/op</sub> | <sub>46270045</sub> | <sub>41.54 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetStringExpiring-8 </sub>| <sub>18392893</sub> | <sub>63.41 ns/op</sub> | <sub>17788724</sub> | <sub>61.42 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetStringNotExpiring-8 </sub>| <sub>46400654</sub> | <sub>28.45 ns/op</sub> | <sub>40226074</sub> | <sub>27.41 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetDelete-8 </sub>| <sub>18703620</sub> | <sub>60.75 ns/op</sub> | <sub>18270448</sub> | <sub>59.90 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetDeleteSingleLock-8 </sub>| <sub>32633755</sub> | <sub>39.34 ns/op</sub> | <sub>32415156</sub> | <sub>36.96 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetStructExpiring-8 </sub>| <sub>30487856</sub> | <sub>41.60 ns/op</sub> | <sub>26925226</sub> | <sub>40.55 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetStructNotExpiring-8 </sub>| <sub>91921044</sub> | <sub>13.94 ns/op</sub> | <sub>96379750</sub> | <sub>13.08 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetStructExpiring-8 </sub>| <sub>13977464</sub> | <sub>86.44 ns/op</sub> | <sub>13364509</sub> | <sub>87.69 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetStructNotExpiring-8 </sub>| <sub>22749384</sub> | <sub>54.14 ns/op</sub> | <sub>23207397</sub> | <sub>52.58 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheSetFatStructExpiring-8 </sub>| <sub>11718718</sub> | <sub>103.3 ns/op</sub> | <sub>12051895</sub> | <sub>102.3 ns/op</sub> |
|
|
|
|
|
| <sub>BenchmarkCacheGetFatStructNotExpiring-8 </sub>| <sub>88695709</sub> | <sub>13.92 ns/op</sub> | <sub>83220014</sub> | <sub>13.76 ns/op</sub> |
|
|
|
|
|
|
|
|
|
|