@@ -2,7 +2,9 @@ module Benchmark.Main (main) where
2
2
3
3
import Prelude
4
4
5
+ import Benchmark.Free as Free
5
6
import Benchmark.Freef686f5f as Freef686f5f
7
+ import Benchmark.Trampoline as Trampoline
6
8
import Benchmark.Trampoline0df59c5 as Trampoline0df59c5
7
9
import Benchmark.Trampolinef686f5f as Trampolinef686f5f
8
10
import Benchotron.Core (Benchmark , benchFn , mkBenchmark )
@@ -30,25 +32,32 @@ leftBindSmallBenchmark =
30
32
, inputsPerSize: inputsPerSize
31
33
, gen: \n -> vectorOf n (pure 0.0 )
32
34
, functions:
33
- [ benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds)
34
- , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< bindsT)
35
+ [ benchFn " Free (master)" (Trampoline .runTrampoline <<< binds)
36
+ , benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds_5_2_0)
37
+ , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< binds_0_6_1)
35
38
]
36
39
}
37
40
where
38
41
inputsPerSize :: Int
39
42
inputsPerSize = 100
40
43
41
- binds :: Array Number -> Trampolinef686f5f .Trampoline Number
44
+ binds :: Array Number -> Trampoline .Trampoline Number
42
45
binds as = foldl (\b a -> b >>= const (gen a)) (gen 0.0 ) as
43
46
44
- gen :: forall a . a -> Trampolinef686f5f .Trampoline a
45
- gen = Freef686f5f .suspendF <<< Trampolinef686f5f .done
47
+ gen :: forall a . a -> Trampoline .Trampoline a
48
+ gen = Free .suspend <<< Trampoline .done
46
49
47
- bindsT :: Array Number -> Trampoline0df59c5 .Trampoline Number
48
- bindsT as = foldl (\b a -> b >>= const (genT a)) (genT 0.0 ) as
50
+ binds_5_2_0 :: Array Number -> Trampolinef686f5f .Trampoline Number
51
+ binds_5_2_0 as = foldl (\b a -> b >>= const (gen_5_2_0 a)) (gen_5_2_0 0.0 ) as
49
52
50
- genT :: forall a . a -> Trampoline0df59c5.Trampoline a
51
- genT = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
53
+ gen_5_2_0 :: forall a . a -> Trampolinef686f5f.Trampoline a
54
+ gen_5_2_0 = Freef686f5f .suspendF <<< Trampolinef686f5f .done
55
+
56
+ binds_0_6_1 :: Array Number -> Trampoline0df59c5.Trampoline Number
57
+ binds_0_6_1 as = foldl (\b a -> b >>= const (gen_0_6_1 a)) (gen_0_6_1 0.0 ) as
58
+
59
+ gen_0_6_1 :: forall a . a -> Trampoline0df59c5.Trampoline a
60
+ gen_0_6_1 = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
52
61
53
62
rightBindSmallBenchmark :: Benchmark
54
63
rightBindSmallBenchmark =
@@ -60,25 +69,32 @@ rightBindSmallBenchmark =
60
69
, inputsPerSize: inputsPerSize
61
70
, gen: \n -> vectorOf n (pure 0.0 )
62
71
, functions:
63
- [ benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds)
64
- , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< bindsT)
72
+ [ benchFn " Free (master)" (Trampoline .runTrampoline <<< binds)
73
+ , benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds_5_2_0)
74
+ , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< binds_0_6_1)
65
75
]
66
76
}
67
77
where
68
78
inputsPerSize :: Int
69
79
inputsPerSize = 100
70
80
71
- binds :: Array Number -> Trampolinef686f5f .Trampoline Number
81
+ binds :: Array Number -> Trampoline .Trampoline Number
72
82
binds as = foldl (\b a -> gen a >>= const b) (gen 0.0 ) as
73
83
74
- gen :: forall a . a -> Trampolinef686f5f.Trampoline a
75
- gen = Freef686f5f .suspendF <<< Trampolinef686f5f .done
84
+ gen :: forall a . a -> Trampoline.Trampoline a
85
+ gen = Free .suspend <<< Trampoline .done
86
+
87
+ binds_5_2_0 :: Array Number -> Trampolinef686f5f.Trampoline Number
88
+ binds_5_2_0 as = foldl (\b a -> gen_5_2_0 a >>= const b) (gen_5_2_0 0.0 ) as
89
+
90
+ gen_5_2_0 :: forall a . a -> Trampolinef686f5f.Trampoline a
91
+ gen_5_2_0 = Freef686f5f .suspendF <<< Trampolinef686f5f .done
76
92
77
- bindsT :: Array Number -> Trampoline0df59c5.Trampoline Number
78
- bindsT as = foldl (\b a -> genT a >>= const b) (genT 0.0 ) as
93
+ binds_0_6_1 :: Array Number -> Trampoline0df59c5.Trampoline Number
94
+ binds_0_6_1 as = foldl (\b a -> gen_0_6_1 a >>= const b) (gen_0_6_1 0.0 ) as
79
95
80
- genT :: forall a . a -> Trampoline0df59c5.Trampoline a
81
- genT = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
96
+ gen_0_6_1 :: forall a . a -> Trampoline0df59c5.Trampoline a
97
+ gen_0_6_1 = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
82
98
83
99
leftBindLargeBenchmark :: Benchmark
84
100
leftBindLargeBenchmark =
@@ -90,26 +106,33 @@ leftBindLargeBenchmark =
90
106
, inputsPerSize: inputsPerSize
91
107
, gen: \n -> vectorOf n (pure 0.0 )
92
108
, functions:
93
- [ benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds)
109
+ [ benchFn " Free (master)" (Trampoline .runTrampoline <<< binds)
110
+ , benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds_5_2_0)
94
111
-- Disabled due to stack overflow
95
- -- , benchFn "Free v0.6.1" (Trampoline0df59c5.runTrampoline <<< bindsT )
112
+ -- , benchFn "Free v0.6.1" (Trampoline0df59c5.runTrampoline <<< binds_0_6_1 )
96
113
]
97
114
}
98
115
where
99
116
inputsPerSize :: Int
100
117
inputsPerSize = 1
101
118
102
- binds :: Array Number -> Trampolinef686f5f .Trampoline Number
119
+ binds :: Array Number -> Trampoline .Trampoline Number
103
120
binds as = foldl (\b a -> b >>= const (gen a)) (gen 0.0 ) as
104
121
105
- gen :: forall a . a -> Trampolinef686f5f .Trampoline a
106
- gen = Freef686f5f .suspendF <<< Trampolinef686f5f .done
122
+ gen :: forall a . a -> Trampoline .Trampoline a
123
+ gen = Free .suspend <<< Trampoline .done
107
124
108
- bindsT :: Array Number -> Trampoline0df59c5 .Trampoline Number
109
- bindsT as = foldl (\b a -> b >>= const (genT a)) (genT 0.0 ) as
125
+ binds_5_2_0 :: Array Number -> Trampolinef686f5f .Trampoline Number
126
+ binds_5_2_0 as = foldl (\b a -> b >>= const (gen_5_2_0 a)) (gen_5_2_0 0.0 ) as
110
127
111
- genT :: forall a . a -> Trampoline0df59c5.Trampoline a
112
- genT = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
128
+ gen_5_2_0 :: forall a . a -> Trampolinef686f5f.Trampoline a
129
+ gen_5_2_0 = Freef686f5f .suspendF <<< Trampolinef686f5f .done
130
+
131
+ binds_0_6_1 :: Array Number -> Trampoline0df59c5.Trampoline Number
132
+ binds_0_6_1 as = foldl (\b a -> b >>= const (gen_0_6_1 a)) (gen_0_6_1 0.0 ) as
133
+
134
+ gen_0_6_1 :: forall a . a -> Trampoline0df59c5.Trampoline a
135
+ gen_0_6_1 = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
113
136
114
137
rightBindLargeBenchmark :: Benchmark
115
138
rightBindLargeBenchmark =
@@ -121,22 +144,29 @@ rightBindLargeBenchmark =
121
144
, inputsPerSize: inputsPerSize
122
145
, gen: \n -> vectorOf n (pure 0.0 )
123
146
, functions:
124
- [ benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds)
125
- , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< bindsT)
147
+ [ benchFn " Free (master)" (Trampoline .runTrampoline <<< binds)
148
+ , benchFn " Free v5.2.0" (Trampolinef686f5f .runTrampoline <<< binds_5_2_0)
149
+ , benchFn " Free v0.6.1" (Trampoline0df59c5 .runTrampoline <<< binds_0_6_1)
126
150
]
127
151
}
128
152
where
129
153
inputsPerSize :: Int
130
154
inputsPerSize = 1
131
155
132
- binds :: Array Number -> Trampolinef686f5f .Trampoline Number
156
+ binds :: Array Number -> Trampoline .Trampoline Number
133
157
binds as = foldl (\b a -> gen a >>= const b) (gen 0.0 ) as
134
158
135
- gen :: forall a . a -> Trampolinef686f5f.Trampoline a
136
- gen = Freef686f5f .suspendF <<< Trampolinef686f5f .done
159
+ gen :: forall a . a -> Trampoline.Trampoline a
160
+ gen = Free .suspend <<< Trampoline .done
161
+
162
+ binds_5_2_0 :: Array Number -> Trampolinef686f5f.Trampoline Number
163
+ binds_5_2_0 as = foldl (\b a -> gen_5_2_0 a >>= const b) (gen_5_2_0 0.0 ) as
164
+
165
+ gen_5_2_0 :: forall a . a -> Trampolinef686f5f.Trampoline a
166
+ gen_5_2_0 = Freef686f5f .suspendF <<< Trampolinef686f5f .done
137
167
138
- bindsT :: Array Number -> Trampoline0df59c5.Trampoline Number
139
- bindsT as = foldl (\b a -> genT a >>= const b) (genT 0.0 ) as
168
+ binds_0_6_1 :: Array Number -> Trampoline0df59c5.Trampoline Number
169
+ binds_0_6_1 as = foldl (\b a -> gen_0_6_1 a >>= const b) (gen_0_6_1 0.0 ) as
140
170
141
- genT :: forall a . a -> Trampoline0df59c5.Trampoline a
142
- genT = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
171
+ gen_0_6_1 :: forall a . a -> Trampoline0df59c5.Trampoline a
172
+ gen_0_6_1 = Trampoline0df59c5 .suspend <<< Trampoline0df59c5 .done
0 commit comments