Skip to content

Commit 4843f46

Browse files
committed
Further speedup for large cached results
1 parent 3657e59 commit 4843f46

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "SimpleGraphs"
22
uuid = "55797a34-41de-5266-9ec1-32ac4eb504d3"
3-
version = "0.7.12"
3+
version = "0.7.13"
44

55
[deps]
66
AbstractLattices = "398f06c4-4d28-53ec-89ca-5b2656b7603d"

src/cache.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cache_check(G::SimpleGraph, item::Symbol)::Bool = G.cache_flag && haskey(G.cache
3333
**WARNING**: No check is done to see if this value is defined. Be
3434
sure to use `cache_check` first!
3535
"""
36-
cache_recall(G::SimpleGraph, item::Symbol) = deepcopy(G.cache[item])
36+
cache_recall(G::SimpleGraph, item::Symbol) = G.cache[item]
3737

3838

3939

@@ -43,7 +43,7 @@ the symbol (key) `item` in the cache for this graph.
4343
"""
4444
function cache_save(G::SimpleGraph, item::Symbol, value)
4545
if G.cache_flag
46-
G.cache[item] = deepcopy(value)
46+
G.cache[item] = value
4747
end
4848
nothing
4949
end

0 commit comments

Comments
 (0)