Skip to content

Commit 2db9e39

Browse files
authored
Merge branch 'master' into optimize-traversal
2 parents e9fa7f9 + 6f706f1 commit 2db9e39

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

benchmark/benchmarks.jl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,20 @@ function ancestors_workload(nodes, reps::Int)
8888
return s
8989
end
9090

91-
function ancestors_workload_inplace(nodes, reps::Int)
91+
function ancestors_workload_inplace_1(nodes, reps::Int)
92+
s = 0.0
93+
@inbounds for _ in 1:reps
94+
for n in nodes
95+
out = ancestors!(n, :mass, recursivity_level=4, type=Float64)
96+
for v in out
97+
s += v
98+
end
99+
end
100+
end
101+
return s
102+
end
103+
104+
function ancestors_workload_inplace_2(nodes, reps::Int)
92105
s = 0.0
93106
buf = Float64[]
94107
@inbounds for _ in 1:reps

0 commit comments

Comments
 (0)