/
runbenchmarks.jl
62 lines (58 loc) · 1.72 KB
/
runbenchmarks.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using Polyhedra
using BenchmarkTools
using StaticArrays
# Intersection/Vector
# BenchmarkTools.Trial:
# memory estimate: 133.73 KiB
# allocs estimate: 2424
# --------------
# minimum time: 454.533 μs (0.00% GC)
# median time: 461.111 μs (0.00% GC)
# mean time: 488.875 μs (4.38% GC)
# maximum time: 4.360 ms (87.57% GC)
# --------------
# samples: 10000
# evals/sample: 1
# Intersection/SVector # FIXME why does it need more allocs ? It should be the opposite
# BenchmarkTools.Trial:
# memory estimate: 572.52 KiB
# allocs estimate: 21094
# --------------
# minimum time: 499.253 μs (0.00% GC)
# median time: 612.736 μs (0.00% GC)
# mean time: 866.356 μs (29.38% GC)
# maximum time: 12.673 ms (93.11% GC)
# --------------
# samples: 5749
# evals/sample: 1
# MixedMatHRep
# BenchmarkTools.Trial:
# memory estimate: 148.64 KiB
# allocs estimate: 2775
# --------------
# minimum time: 479.105 μs (0.00% GC)
# median time: 486.236 μs (0.00% GC)
# mean time: 508.813 μs (3.73% GC)
# maximum time: 3.555 ms (83.56% GC)
# --------------
# samples: 9809
# evals/sample: 1
let
h = hrep([HalfSpace([ 1., 1], 1),
HalfSpace([ 1., -1], 0),
HalfSpace([-1., 0], 0)])
display(@benchmark(doubledescription($h)))
end
let
h = hrep([HalfSpace((@SVector [ 1, 1]), 1),
HalfSpace((@SVector [ 1, -1]), 0),
HalfSpace((@SVector [-1, 0]), 0)])
display(@benchmark(doubledescription($h)))
end
let
h = hrep([ 1 1
1 -1
-1 0],
[1., 0, 0])
display(@benchmark(doubledescription($h)))
end