Skip to content

Commit bf087a2

Browse files
committed
Update number of runs for C benchmarks
1 parent 81c80d5 commit bf087a2

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

test/benchmark_libdfp.c

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <time.h>
99
#include <inttypes.h>
1010

11-
#define K 2000000
11+
#define K 20000000
1212
#define N 5
1313

1414
double float_rand(double min, double max)
@@ -136,21 +136,21 @@ __attribute__ ((__noinline__)) void test_comparisons_128(_Decimal128* data, cons
136136

137137
typedef _Decimal32 (*operation_32)(_Decimal32, _Decimal32);
138138

139-
_Decimal32 add_32(_Decimal32 a, _Decimal32 b)
139+
__attribute__ ((__noinline__)) _Decimal32 add_32(_Decimal32 a, _Decimal32 b)
140140
{
141141
return a + b;
142142
}
143-
_Decimal32 sub_32(_Decimal32 a, _Decimal32 b)
143+
__attribute__ ((__noinline__)) _Decimal32 sub_32(_Decimal32 a, _Decimal32 b)
144144
{
145145
return a - b;
146146
}
147147

148-
_Decimal32 mul_32(_Decimal32 a, _Decimal32 b)
148+
__attribute__ ((__noinline__)) _Decimal32 mul_32(_Decimal32 a, _Decimal32 b)
149149
{
150150
return a * b;
151151
}
152152

153-
_Decimal32 div_32(_Decimal32 a, _Decimal32 b)
153+
__attribute__ ((__noinline__)) _Decimal32 div_32(_Decimal32 a, _Decimal32 b)
154154
{
155155
return a / b;
156156
}
@@ -181,21 +181,22 @@ __attribute__ ((__noinline__)) void test_two_element_operation_32(_Decimal32* da
181181

182182
typedef _Decimal64 (*operation_64)(_Decimal64, _Decimal64);
183183

184-
_Decimal64 add_64(_Decimal64 a, _Decimal64 b)
184+
__attribute__ ((__noinline__)) _Decimal64 add_64(_Decimal64 a, _Decimal64 b)
185185
{
186186
return a + b;
187187
}
188-
_Decimal64 sub_64(_Decimal64 a, _Decimal64 b)
188+
189+
__attribute__ ((__noinline__)) _Decimal64 sub_64(_Decimal64 a, _Decimal64 b)
189190
{
190191
return a - b;
191192
}
192193

193-
_Decimal64 mul_64(_Decimal64 a, _Decimal64 b)
194+
__attribute__ ((__noinline__)) _Decimal64 mul_64(_Decimal64 a, _Decimal64 b)
194195
{
195196
return a * b;
196197
}
197198

198-
_Decimal64 div_64(_Decimal64 a, _Decimal64 b)
199+
__attribute__ ((__noinline__)) _Decimal64 div_64(_Decimal64 a, _Decimal64 b)
199200
{
200201
return a / b;
201202
}
@@ -226,21 +227,22 @@ __attribute__ ((__noinline__)) void test_two_element_operation_64(_Decimal64* da
226227

227228
typedef _Decimal128 (*operation_128)(_Decimal128, _Decimal128);
228229

229-
_Decimal128 add_128(_Decimal128 a, _Decimal128 b)
230+
__attribute__ ((__noinline__)) _Decimal128 add_128(_Decimal128 a, _Decimal128 b)
230231
{
231232
return a + b;
232233
}
233-
_Decimal128 sub_128(_Decimal128 a, _Decimal128 b)
234+
235+
__attribute__ ((__noinline__)) _Decimal128 sub_128(_Decimal128 a, _Decimal128 b)
234236
{
235237
return a - b;
236238
}
237239

238-
_Decimal128 mul_128(_Decimal128 a, _Decimal128 b)
240+
__attribute__ ((__noinline__)) _Decimal128 mul_128(_Decimal128 a, _Decimal128 b)
239241
{
240242
return a * b;
241243
}
242244

243-
_Decimal128 div_128(_Decimal128 a, _Decimal128 b)
245+
__attribute__ ((__noinline__)) _Decimal128 div_128(_Decimal128 a, _Decimal128 b)
244246
{
245247
return a / b;
246248
}

0 commit comments

Comments
 (0)