Releases: deliro/moka-py
Releases · deliro/moka-py
0.1.16
0.1.15
- add remove
default
option - speed up
get
s ~40% - update docs
Full Changelog: 0.1.14...0.1.15
0.1.14
- Add
policy
choosing (TinyLFU/LRU)
Full Changelog: 0.1.13...0.1.14
0.1.13
Full Changelog: https://github.com/deliro/moka-py/commits/0.1.13
0.1.12
Added eviction listener support
Full Changelog: 0.1.11...0.1.12
0.1.11
Full Changelog: 0.1.10...0.1.11
0.1.10
0.1.9
This release contains several approaches to speed up moka-py
Summary:
Moka.get
x1.21 speed up on hits (not misses)Moka.get
x0.87 slow down on misses (I believe you have more than 50% cache hit rate)Moka.get_with
x1.3 speed upMoka.set
x1.1 speed up- GIL is relaxed in several points to speed up multithreaded environments
Benchmarks:
Before:
------------------------------------------------------------------------------------------- benchmark: 5 tests -------------------------------------------------------------------------------------------
Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Mops/s) Rounds Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_bench_get_non_existent 179.6285 (1.0) 180.8282 (1.0) 180.1620 (1.0) 0.5334 (2.35) 180.0952 (1.0) 0.9733 (2.57) 2;0 5.5506 (1.0) 5 10000000
test_bench_get 272.2006 (1.52) 276.4753 (1.53) 273.2286 (1.52) 1.8217 (8.03) 272.5346 (1.51) 1.2622 (3.33) 1;1 3.6599 (0.66) 5 1837011
test_bench_get_with 324.1755 (1.80) 324.6700 (1.80) 324.4797 (1.80) 0.2269 (1.0) 324.6167 (1.80) 0.3793 (1.0) 1;0 3.0819 (0.56) 5 1541716
test_bench_set_huge 786.8319 (4.38) 812.0210 (4.49) 794.3915 (4.41) 10.2194 (45.04) 789.7347 (4.39) 10.1896 (26.87) 1;0 1.2588 (0.23) 5 1000000
test_bench_set 812.6144 (4.52) 829.8675 (4.59) 821.4320 (4.56) 7.5132 (33.12) 824.9048 (4.58) 12.5326 (33.04) 2;0 1.2174 (0.22) 5 1000000
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
After:
------------------------------------------------------------------------------------------- benchmark: 5 tests -------------------------------------------------------------------------------------------
Name (time in ns) Min Max Mean StdDev Median IQR Outliers OPS (Mops/s) Rounds Iterations
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_bench_get_non_existent 206.3389 (1.0) 208.9872 (1.0) 207.0240 (1.0) 1.1154 (4.27) 206.5119 (1.0) 0.9932 (2.73) 1;1 4.8304 (1.0) 5 10000000
test_bench_get 224.4981 (1.09) 229.1849 (1.10) 225.8305 (1.09) 1.9252 (7.37) 224.9832 (1.09) 1.8345 (5.05) 1;0 4.4281 (0.92) 5 10000000
test_bench_get_with 248.2484 (1.20) 248.9123 (1.19) 248.5142 (1.20) 0.2612 (1.0) 248.5172 (1.20) 0.3634 (1.0) 2;0 4.0239 (0.83) 5 2020760
test_bench_set_huge 676.6090 (3.28) 692.0143 (3.31) 683.5817 (3.30) 6.5151 (24.94) 684.8168 (3.32) 10.9585 (30.16) 2;0 1.4629 (0.30) 5 1000000
test_bench_set 723.4063 (3.51) 770.0967 (3.68) 738.1940 (3.57) 18.5167 (70.89) 733.0997 (3.55) 18.1077 (49.83) 1;0 1.3547 (0.28) 5 1000000
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Full Changelog: 0.1.8...0.1.9
0.1.8
- Add
Moka.get_with
method to synchronize concurrent access to keys from multiple threads - Add
with_concurrent=True
option tomoka_py.cached()
decorator that takes care of concurrent access from multiple threads
Full Changelog: 0.1.7...0.1.8
0.1.7
Full Changelog: 0.1.6...0.1.7