|
8 | 8 | #include <time.h> |
9 | 9 | #include <inttypes.h> |
10 | 10 |
|
11 | | -#define K 2000000 |
| 11 | +#define K 20000000 |
12 | 12 | #define N 5 |
13 | 13 |
|
14 | 14 | double float_rand(double min, double max) |
@@ -136,21 +136,21 @@ __attribute__ ((__noinline__)) void test_comparisons_128(_Decimal128* data, cons |
136 | 136 |
|
137 | 137 | typedef _Decimal32 (*operation_32)(_Decimal32, _Decimal32); |
138 | 138 |
|
139 | | -_Decimal32 add_32(_Decimal32 a, _Decimal32 b) |
| 139 | +__attribute__ ((__noinline__)) _Decimal32 add_32(_Decimal32 a, _Decimal32 b) |
140 | 140 | { |
141 | 141 | return a + b; |
142 | 142 | } |
143 | | -_Decimal32 sub_32(_Decimal32 a, _Decimal32 b) |
| 143 | +__attribute__ ((__noinline__)) _Decimal32 sub_32(_Decimal32 a, _Decimal32 b) |
144 | 144 | { |
145 | 145 | return a - b; |
146 | 146 | } |
147 | 147 |
|
148 | | -_Decimal32 mul_32(_Decimal32 a, _Decimal32 b) |
| 148 | +__attribute__ ((__noinline__)) _Decimal32 mul_32(_Decimal32 a, _Decimal32 b) |
149 | 149 | { |
150 | 150 | return a * b; |
151 | 151 | } |
152 | 152 |
|
153 | | -_Decimal32 div_32(_Decimal32 a, _Decimal32 b) |
| 153 | +__attribute__ ((__noinline__)) _Decimal32 div_32(_Decimal32 a, _Decimal32 b) |
154 | 154 | { |
155 | 155 | return a / b; |
156 | 156 | } |
@@ -181,21 +181,22 @@ __attribute__ ((__noinline__)) void test_two_element_operation_32(_Decimal32* da |
181 | 181 |
|
182 | 182 | typedef _Decimal64 (*operation_64)(_Decimal64, _Decimal64); |
183 | 183 |
|
184 | | -_Decimal64 add_64(_Decimal64 a, _Decimal64 b) |
| 184 | +__attribute__ ((__noinline__)) _Decimal64 add_64(_Decimal64 a, _Decimal64 b) |
185 | 185 | { |
186 | 186 | return a + b; |
187 | 187 | } |
188 | | -_Decimal64 sub_64(_Decimal64 a, _Decimal64 b) |
| 188 | + |
| 189 | +__attribute__ ((__noinline__)) _Decimal64 sub_64(_Decimal64 a, _Decimal64 b) |
189 | 190 | { |
190 | 191 | return a - b; |
191 | 192 | } |
192 | 193 |
|
193 | | -_Decimal64 mul_64(_Decimal64 a, _Decimal64 b) |
| 194 | +__attribute__ ((__noinline__)) _Decimal64 mul_64(_Decimal64 a, _Decimal64 b) |
194 | 195 | { |
195 | 196 | return a * b; |
196 | 197 | } |
197 | 198 |
|
198 | | -_Decimal64 div_64(_Decimal64 a, _Decimal64 b) |
| 199 | +__attribute__ ((__noinline__)) _Decimal64 div_64(_Decimal64 a, _Decimal64 b) |
199 | 200 | { |
200 | 201 | return a / b; |
201 | 202 | } |
@@ -226,21 +227,22 @@ __attribute__ ((__noinline__)) void test_two_element_operation_64(_Decimal64* da |
226 | 227 |
|
227 | 228 | typedef _Decimal128 (*operation_128)(_Decimal128, _Decimal128); |
228 | 229 |
|
229 | | -_Decimal128 add_128(_Decimal128 a, _Decimal128 b) |
| 230 | +__attribute__ ((__noinline__)) _Decimal128 add_128(_Decimal128 a, _Decimal128 b) |
230 | 231 | { |
231 | 232 | return a + b; |
232 | 233 | } |
233 | | -_Decimal128 sub_128(_Decimal128 a, _Decimal128 b) |
| 234 | + |
| 235 | +__attribute__ ((__noinline__)) _Decimal128 sub_128(_Decimal128 a, _Decimal128 b) |
234 | 236 | { |
235 | 237 | return a - b; |
236 | 238 | } |
237 | 239 |
|
238 | | -_Decimal128 mul_128(_Decimal128 a, _Decimal128 b) |
| 240 | +__attribute__ ((__noinline__)) _Decimal128 mul_128(_Decimal128 a, _Decimal128 b) |
239 | 241 | { |
240 | 242 | return a * b; |
241 | 243 | } |
242 | 244 |
|
243 | | -_Decimal128 div_128(_Decimal128 a, _Decimal128 b) |
| 245 | +__attribute__ ((__noinline__)) _Decimal128 div_128(_Decimal128 a, _Decimal128 b) |
244 | 246 | { |
245 | 247 | return a / b; |
246 | 248 | } |
|
0 commit comments