From b19b10b20342a75de764241297908267e407c97b Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Tue, 15 Apr 2025 19:25:13 +0100 Subject: [PATCH 1/2] Update benchmark.jl --- perf/benchmark.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perf/benchmark.jl b/perf/benchmark.jl index a78a59bf..74a141a4 100644 --- a/perf/benchmark.jl +++ b/perf/benchmark.jl @@ -8,7 +8,7 @@ function benchmark_driver!(f, x...; f_displayname=string(f)) x = (x..., nothing) println("benchmarking $(f_displayname)...") - tf = Libtask.TapedFunction(f, x...) + tf = Libtask.TapedTask(nothing, f, x...) print(" Run Original Function:") @btime $f($(x)...) From 897f3cb2bdd58467dae877dd9bc94507be30a072 Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Tue, 15 Apr 2025 19:27:17 +0100 Subject: [PATCH 2/2] Update benchmark.jl --- perf/benchmark.jl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/perf/benchmark.jl b/perf/benchmark.jl index 74a141a4..d268c1bf 100644 --- a/perf/benchmark.jl +++ b/perf/benchmark.jl @@ -14,20 +14,15 @@ function benchmark_driver!(f, x...; f_displayname=string(f)) @btime $f($(x)...) GC.gc() - print(" Run TapedFunction:") - @btime $tf($(x)...) - GC.gc() - - ctf = Libtask.compile(tf) - print(" Run TapedFunction (compiled):") - @btime $ctf($(x)...) - GC.gc() + # print(" Run TapedFunction:") + # @btime $tf($(x)...) + # GC.gc() print(" Run TapedTask: ") x = (x[1:(end - 1)]..., produce) # show the number of produce calls inside `f` function f_task(f, x; verbose=false) - tt = TapedTask(f, x...) + tt = TapedTask(nothing, f, x...) c = 0 while consume(tt) !== nothing c += 1