File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ Some other approaches to concurrent caches include:
2727 contention.
2828
2929
30- # Example:
30+ ## Example:
3131``` julia
3232julia> cache = MultiThreadedCache {Int, Int} (Dict (1 => 2 , 2 => 3 ))
3333MultiThreadedCache {Int64, Int64} (Dict (2 => 3 , 1 => 2 ))
@@ -50,3 +50,30 @@ julia> get!(cache, 5) do
5050 end
51516
5252```
53+
54+ ## Performance
55+ Current benchmark results measuring scaling recorded against a baseline of a Dict() + ReentrantLock():
56+
57+ ```
58+ ┌ Info: benchmark results
59+ │ Threads.nthreads() = 1
60+ │ time_serial = 0.03260747
61+ │ time_parallel = 0.152217246
62+ └ time_baseline = 0.131397639
63+ ```
64+
65+ ```
66+ ┌ Info: benchmark results
67+ │ Threads.nthreads() = 20
68+ │ time_serial = 0.030174521
69+ │ time_parallel = 0.307062643
70+ └ time_baseline = 1.239406026
71+ ```
72+
73+ ```
74+ ┌ Info: benchmark results
75+ │ Threads.nthreads() = 100
76+ │ time_serial = 0.030373533
77+ │ time_parallel = 1.771401144
78+ └ time_baseline = 5.397114559
79+ ```
You can’t perform that action at this time.
0 commit comments