Skip to content

Commit 1198038

Browse files
authored
Fix benchmarks (#180)
* Update benchmark.jl * Update benchmark.jl
1 parent 2907f03 commit 1198038

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

perf/benchmark.jl

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,21 @@ function benchmark_driver!(f, x...; f_displayname=string(f))
88
x = (x..., nothing)
99

1010
println("benchmarking $(f_displayname)...")
11-
tf = Libtask.TapedFunction(f, x...)
11+
tf = Libtask.TapedTask(nothing, f, x...)
1212

1313
print(" Run Original Function:")
1414
@btime $f($(x)...)
1515
GC.gc()
1616

17-
print(" Run TapedFunction:")
18-
@btime $tf($(x)...)
19-
GC.gc()
20-
21-
ctf = Libtask.compile(tf)
22-
print(" Run TapedFunction (compiled):")
23-
@btime $ctf($(x)...)
24-
GC.gc()
17+
# print(" Run TapedFunction:")
18+
# @btime $tf($(x)...)
19+
# GC.gc()
2520

2621
print(" Run TapedTask: ")
2722
x = (x[1:(end - 1)]..., produce)
2823
# show the number of produce calls inside `f`
2924
function f_task(f, x; verbose=false)
30-
tt = TapedTask(f, x...)
25+
tt = TapedTask(nothing, f, x...)
3126
c = 0
3227
while consume(tt) !== nothing
3328
c += 1

0 commit comments

Comments
 (0)