Skip to content

Commit 0efb714

Browse files
committed
Add perf/table.jl
1 parent 755fd4c commit 0efb714

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

perf/table.jl

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
function print_row(s1, s2, s3, s4, c)
2+
print("|", c)
3+
print(lpad(s1, 18, c))
4+
print(c, "|", c)
5+
print(lpad(s2, 10, c))
6+
print(c, "|", c)
7+
print(lpad(s3, 10, c))
8+
print(c, "|", c)
9+
print(lpad(s4, 10, c))
10+
println(c, "|")
11+
end
12+
function prettyprint(name, ::Nothing)
13+
print_row(
14+
name,
15+
"",
16+
"",
17+
"",
18+
' ',
19+
)
20+
end
21+
function prettyprint(name, b::BenchmarkTools.Trial)
22+
print_row(
23+
name,
24+
BenchmarkTools.prettytime(time(b)),
25+
allocs(b),
26+
BenchmarkTools.prettymemory(memory(b)),
27+
' ',
28+
)
29+
end
30+
31+
function prettyprint(bs, bd, bt)
32+
print_row("", "Time", "Alloc", "Memory", ' ')
33+
print_row("", "", "", "", '-')
34+
prettyprint("SIMDPolynomials", bs)
35+
prettyprint("DynamicPolynomials", bd)
36+
prettyprint("TypedPolynomials", bt)
37+
end

0 commit comments

Comments
 (0)