Update 32-bit performace numbers (has not been done for ages)
[ghc.git] / testsuite / tests / perf / should_run / all.T
1 # Tests that newArray/newArray_ is being optimised correctly
2
3 # fortunately the values here are mostly independent of the wordsize,
4 # because the test allocates an unboxed array of doubles.
5
6 test('T3586',
7      [stats_num_field('peak_megabytes_allocated', (17, 1)),
8                                  # expected value: 17 (amd64/Linux)
9       stats_num_field('bytes allocated', (16102024, 5)),
10                         # prev:           16835544 (amd64/Linux)
11                         # 2014-07-17:     16102024 (amd64/Linux), general round of updates
12       only_ways(['normal'])
13       ],
14      compile_and_run,
15      ['-O'])
16
17 test('T4830',
18      [stats_num_field('bytes allocated',
19           [(wordsize(64), 98248, 1),
20            #             127000 (amd64/Linux)
21            # 2013-02-07:  99264 (amd64/Linux)
22            # 2014-01-13:  98248 (amd64/Linux) due to #8647
23            (wordsize(32), 70646, 3)]),
24            # 2013-02-10:  69744 (x86/Windows)
25            # 2013-02-10:  71548 (x86/OSX)
26            # 2014-01-28:  Widen range 2->3
27            #                (x86/Windows - actual 69000, lower was 69233)
28       only_ways(['normal'])
29       ],
30      compile_and_run,
31      ['-O2'])
32
33 test('T3245', normal, compile_and_run, ['-O'])
34
35 # Test that bytestring reading/writing isn't over-allocating.  We had
36 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
37 #
38 test('lazy-bs-alloc',
39      [stats_num_field('peak_megabytes_allocated', (2, 1)),
40                                  # expected value: 2 (amd64/Linux)
41       stats_num_field('bytes allocated',
42           [(wordsize(64), 425400, 1),
43             #             489776 (amd64/Linux)
44             # 2013-02-07: 429744 (amd64/Linux)
45             # 2013-12-12: 425400 (amd64/Linux)
46            (wordsize(32), 411500, 2)]),
47             # 2013-02-10: 421296 (x86/Windows)
48             # 2013-02-10: 414180 (x86/OSX)
49             # 2014-01-22: 411500 (x86/Linux)
50             # 2014-01-28: Widen 1->2% (x86/Windows was at 425212)
51       only_ways(['normal']),
52       extra_run_opts('../../numeric/should_run/arith011.stdout'),
53       ignore_output
54       ],
55       # use a suitably big file, without bloating the repo with a new one:
56      compile_and_run,
57      ['-O'])
58
59 test('T876',
60      [stats_num_field('bytes allocated',
61           [(wordsize(64), 63216 , 5),
62               # 2013-02-14: 1263712 (x86_64/Linux)
63               # 2014-02-10:   63216 (x86_64/Linux), call arity analysis
64
65            (wordsize(32), 56796, 5) ]),
66               # some date:  663712  (Windows, 64-bit machine)
67               # 2014-04-04:  56820  (Windows, 64-bit machine)
68               # 2014-06-29:  53024  (x86_64/Linux)
69               # 2014-12-01:  56796  (Windows)
70
71       only_ways(['normal']),
72       extra_run_opts('10000')
73       ],
74      compile_and_run,
75      ['-O'])
76
77 # Get reproducible floating-point results on x86
78 if config.arch == 'i386':
79    sse2_opts = '-msse2'
80 else:
81    sse2_opts = ''
82
83 test('T4321',
84      omit_ways(['ghci']),
85      compile_and_run, ['-O ' + sse2_opts])
86
87 test('T3736',
88      extra_clean(['T3736.speed.f32']),
89      run_command,
90      ['$MAKE -s --no-print-directory T3736'])
91 test('T3738',
92      [extra_clean(['T3738a.hi', 'T3738a.o']),
93       stats_num_field('peak_megabytes_allocated', (1, 0)),
94                                  # expected value: 1 (amd64/Linux)
95       stats_num_field('bytes allocated',
96                       [(wordsize(32), 45648, 5),
97                     # expected value: 50520 (x86/Linux)
98                        (wordsize(64), 50592, 5)]),
99                     # prev:           49400 (amd64/Linux)
100                     # 2014-07-17:     50520 (amd64/Linux) general round of updates
101                     # 2014-09-10:     50592 (amd64/Linux) post-AMP-update
102       only_ways(['normal'])
103       ],
104      compile_and_run,
105      ['-O'])
106
107 test('MethSharing',
108      [stats_num_field('peak_megabytes_allocated', (1, 0)),
109                                  # expected value: 1 (amd64/Linux)
110       stats_num_field('bytes allocated',
111                       [(wordsize(32), 360940756, 5),
112                     # expected value: 2685858140 (x86/OS X)
113                           # expected: 360940756 (x86/Linux)
114                        (wordsize(64), 640067672, 5)]),
115                           # expected: 640067672 (amd64/Linux)
116       only_ways(['normal'])
117       ],
118      compile_and_run,
119      ['-O'])
120 test('T2902',
121      extra_clean(['T2902_A',    'T2902_B',
122                   'T2902_A.hi', 'T2902_B.hi',
123                   'T2902_A.o',  'T2902_B.o',
124                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
125                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
126                   'T2902_Sum.hi',
127                   'T2902_Sum.o']),
128      run_command,
129      ['$MAKE -s --no-print-directory T2902'])
130 test('T149',
131      [ # expect_broken(149),
132        # working (2 Jul 2013, x86-64/Linux)
133       extra_clean(['T149_A',    'T149_B',
134                    'T149_A.hi', 'T149_B.hi',
135                    'T149_A.o',  'T149_B.o'])],
136      run_command,
137      ['$MAKE -s --no-print-directory T149'])
138
139 test('T5113',
140      [stats_num_field('bytes allocated',
141                       [(wordsize(32), 4000000, 5),
142                        (wordsize(64), 8000000, 5)]),
143       only_ways(['normal'])
144       ],
145      compile_and_run,
146      ['-O'])
147
148
149 test('T4978',
150      [stats_num_field('bytes allocated',
151                       [(wordsize(32), 10000000, 5),
152                        (wordsize(64), 10137680, 5)]),
153                     # expected value: 10137680 (amd64/Linux)
154       only_ways(['normal'])
155       ],
156      compile_and_run,
157      ['-O2'])
158
159 test('T5205',
160      [stats_num_field('bytes allocated',
161                       [(wordsize(32), 47088, 5),
162                     # expected value: 47088 (x86/Darwin)
163                        (wordsize(64), 52600, 5)]),
164                     # expected value: 51320 (amd64/Linux)
165                     # 2014-07-17:     52600 (amd64/Linux) general round of updates
166       only_ways(['normal', 'optasm'])
167       ],
168      compile_and_run,
169      [''])
170
171 test('T5549',
172      [stats_num_field('bytes allocated',
173                       [(wordsize(32), 4096606332, 5),
174                     # expected value: 3362958676 (Windows)
175                     # 2014-12-01:     4096606332 (Windows) integer-gmp2
176
177                        (wordsize(64), 8193140752, 5)]),
178                     # expected value: 6725846120 (amd64/Linux)
179                     #                 8193140752 (amd64/Linux) integer-gmp2
180       only_ways(['normal'])
181       ],
182      compile_and_run,
183      ['-O'])
184
185 test('T4474a',
186      [stats_num_field('bytes allocated',
187                       [(wordsize(32), 2405242767, 5),
188                        (wordsize(64), 4831890304, 5)]),
189                     # expected value: 4831890304 (amd64/OSX)
190       only_ways(['normal'])
191       ],
192      compile_and_run,
193      ['-O'])
194 test('T4474b',
195      [stats_num_field('bytes allocated',
196                       [(wordsize(32), 2405242767, 5),
197                        (wordsize(64), 4831890304, 5)]),
198                     # expected value: 4831890304 (amd64/OSX)
199       only_ways(['normal'])
200       ],
201      compile_and_run,
202      ['-O'])
203 test('T4474c',
204      [stats_num_field('bytes allocated',
205                       [(wordsize(32), 2405242767, 5),
206                        (wordsize(64), 4831890304, 5)]),
207                     # expected value: 4831890304 (amd64/OSX)
208       only_ways(['normal'])
209       ],
210      compile_and_run,
211      ['-O'])
212
213 test('T5237',
214      [stats_num_field('bytes allocated',
215                         [(platform('i386-unknown-mingw32'), 73280, 5),
216                          (wordsize(32), 78328, 5),
217                       # expected value: 78328 (i386/Linux)
218                          (wordsize(64), 104176, 5)]),
219                       # expected value: 110888 (amd64/Linux)
220                       # expected value: 104176 (amd64/Linux)
221      only_ways(['normal'])
222      ],
223     compile_and_run,
224     ['-O ' + sse2_opts])
225
226 test('T5536',
227      [stats_num_field('bytes allocated',
228                       [(wordsize(32), 446260520, 1),
229                                    # 1246287228 (i386/Linux)
230                                     # 446328556 (i386/Windows)
231                                     # 446192484 (i386/OSX)
232                        (wordsize(64), 892399040, 5)]),
233                    # expected value: 2492589480 (amd64/Linux)
234                    # 17/1/13:         892399040 (x86_64/Linux)
235                    #                  (new demand analyser)
236      extra_clean(['T5536.data']),
237      ignore_output,
238      only_ways(['normal'])
239      ],
240     compile_and_run,
241     ['-O'])
242
243 test('T7257',
244      [stats_num_field('bytes allocated',
245                       [(wordsize(32), 1150000000, 10),
246                     # expected value: 1246287228 (i386/Linux)
247                        (wordsize(64), 1774893760, 5)]),
248                         # 2012-09-21: 1774893760 (amd64/Linux)
249       stats_num_field('peak_megabytes_allocated',
250                       [(wordsize(32), 217, 5),
251                         # 2012-10-08: 217 (x86/Linux)
252                        (wordsize(64), 227, 5)]),
253                         # 2012-09-21: 227 (amd64/Linux)
254
255       only_ways(['normal'])
256      ],
257     compile_and_run, ['-O'])
258
259 test('Conversions',
260      [stats_num_field('bytes allocated',
261                       [(wordsize(32), 76768, 3),
262                         # 2012-12-18: 55316 Guessed 64-bit value / 2
263                         # 2013-02-10: 77472 (x86/OSX)
264                         # 2013-02-10: 79276 (x86/Windows)
265                         # 2014-01-13: 76768 (x86/Linux) due to #8647
266                        (wordsize(64), 107544, 5)]),
267                         # 2012-12-18: 109608 (amd64/OS X)
268                         # 2014-07-17: 107544 (amd64/Linux)
269
270       only_ways(['normal'])
271      ],
272     compile_and_run, ['-O -msse2'])
273
274 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
275 # For 7507, stack overflow is the bad case
276
277 test('T7436',
278      [stats_num_field('max_bytes_used',
279           [(wordsize(64), 60360, 1),
280            #             127000 (amd64/Linux)
281            # 2013-02-07:  60360 (amd64/Linux)
282            (wordsize(32), 58434, 1)]),
283             # 2013-02-10: 58032 (x86/Windows)
284             # 2013-02-10: 58836 (x86/OSX)
285       only_ways(['normal'])
286       ],
287      compile_and_run,
288      ['-O'])
289
290 test('T7797',
291       [stats_num_field('bytes allocated',
292                       [(wordsize(32), 240044984, 5),
293                           # expected value: 2685858140 (x86/OS X)
294                           # expected: 360940756 (x86/Linux)
295                           # expected: 240044984 (x86/Windows, 64bit machine)
296                        (wordsize(64), 480050944, 5)]),
297                           # expected: 480050944 (amd64/Linux)
298       extra_clean(['T7797a.hi', 'T7797a.o']),
299       only_ways(['normal'])
300       ],
301      compile_and_run,
302      ['-O'])
303
304 test('T7954',
305       [stats_num_field('bytes allocated',
306                       [(wordsize(32), 920045264, 10),
307               # some date:  1380051408    (64-bit Windows machine)
308               # 2014-04-04:  920045264    (64-bit Windows machine)
309                        (wordsize(64), 1680051336, 10)]),
310               # 2014-02-10: 1680051336 (x86_64/Linux), call arity analysis
311       only_ways(['normal'])
312       ],
313      compile_and_run,
314      ['-O'])
315
316 test('T7850',
317      [stats_num_field('peak_megabytes_allocated', 
318                       [(wordsize(32), 2, 10),
319                        (wordsize(64), 4, 10)]),
320       only_ways(['normal'])],
321      compile_and_run,
322      ['-O'])
323
324 test('T5949',
325      [stats_num_field('bytes allocated',
326                       [ (wordsize(32), 116020, 10),
327                         (wordsize(64), 201008, 10)]),
328                       # previously, it was >400000 bytes
329       only_ways(['normal'])],
330      compile_and_run,
331      ['-O'])
332
333 test('T4267',
334      [stats_num_field('bytes allocated',
335                       [ (wordsize(32), 36012, 10)
336                       # 32-bit value close to 64 bit; c.f. T7619
337                       , (wordsize(64), 40992, 10) ]),
338                       # previously, it was >170000 bytes
339                       # 2014-01-17: 130000
340                       # 2014-02-10: 40992 (x86_64/Linux), call arity analysis
341       only_ways(['normal'])],
342      compile_and_run,
343      ['-O'])
344
345 test('T7619',
346      [stats_num_field('bytes allocated',
347                       [ (wordsize(32), 36012, 10)
348                       # 32-bit close to 64-bit value; most of this very 
349                       # small number is standard start-up boilerplate I think
350                       , (wordsize(64), 40992, 10) ]),
351                       # previously, it was >400000 bytes
352       only_ways(['normal'])],
353      compile_and_run,
354      ['-O'])
355
356 test('InlineArrayAlloc',
357      [stats_num_field('bytes allocated',
358                       [ (wordsize(32), 800040960, 5)
359                       , (wordsize(64), 1600040960, 5) ]),
360       only_ways(['normal'])],
361      compile_and_run,
362      ['-O2'])
363
364 test('InlineByteArrayAlloc',
365      [stats_num_field('bytes allocated',
366                       [ (wordsize(32), 1360036012, 5)
367                       , (wordsize(64), 1440040960, 5) ]),
368          # 32 and 64 bit not so different, because 
369          # we are allocating *byte* arrays
370       only_ways(['normal'])],
371      compile_and_run,
372      ['-O2'])
373
374 test('InlineCloneArrayAlloc',
375      [stats_num_field('bytes allocated',
376                       [ (wordsize(32), 800041120, 5) 
377                       , (wordsize(64), 1600041120, 5) ]),
378       only_ways(['normal'])],
379      compile_and_run,
380      ['-O2'])
381
382 test('T9203',
383      [stats_num_field('bytes allocated',
384                       [ (wordsize(32), 50000000, 5)
385                       , (wordsize(64), 94547280, 5) ]),
386                       # was            95747304
387                       # 2019-09-10     94547280 post-AMP cleanup
388       only_ways(['normal'])],
389      compile_and_run,
390      ['-O2'])
391
392 test('T9339',
393      [stats_num_field('bytes allocated',
394                       [ (wordsize(32),    40046844, 5)
395                       , (wordsize(64),    80050760, 5) ]),
396                       # w/o fusing last: 320005080
397                       # 2014-07-22:       80050760
398       only_ways(['normal'])],
399      compile_and_run,
400      ['-O2'])