Fix some of the 32bit perf numbers.
[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', (16835544, 5)),
10                         # expected value: 16835544 (amd64/Linux)
11       only_ways(['normal'])
12       ],
13      compile_and_run,
14      ['-O'])
15
16 test('T4830',
17      [stats_num_field('bytes allocated',
18           [(wordsize(64), 98248, 1),
19            #             127000 (amd64/Linux)
20            # 2013-02-07:  99264 (amd64/Linux)
21            # 2014-01-13:  98248 (amd64/Linux) due to #8647
22            (wordsize(32), 70646, 2)]),
23            # 2013-02-10:  69744 (x86/Windows)
24            # 2013-02-10:  71548 (x86/OSX)
25       only_ways(['normal'])
26       ],
27      compile_and_run,
28      ['-O2'])
29
30 test('T3245', normal, compile_and_run, ['-O'])
31
32 # Test that bytestring reading/writing isn't over-allocating.  We had
33 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
34 #
35 test('lazy-bs-alloc',
36      [stats_num_field('peak_megabytes_allocated', (2, 1)),
37                                  # expected value: 2 (amd64/Linux)
38       stats_num_field('bytes allocated',
39           [(wordsize(64), 425400, 1),
40             #             489776 (amd64/Linux)
41             # 2013-02-07: 429744 (amd64/Linux)
42             # 2013-12-12: 425400 (amd64/Linux)
43            (wordsize(32), 411500, 1)]),
44             # 2013-02-10: 421296 (x86/Windows)
45             # 2013-02-10: 414180 (x86/OSX)
46             # 2014-01-22: 411500 (x86/Linux)
47       only_ways(['normal']),
48       extra_run_opts('../../numeric/should_run/arith011.stdout'),
49       ignore_output
50       ],
51       # use a suitably big file, without bloating the repo with a new one:
52      compile_and_run,
53      ['-O'])
54
55 test('T876',
56      [stats_num_field('bytes allocated',
57           [(wordsize(64), 1263712 , 5),
58               # 2013-02-14: 1263712 (x86_64/Linux)
59            (wordsize(32), 663712, 5)]),
60       only_ways(['normal']),
61       extra_run_opts('10000')
62       ],
63      compile_and_run,
64      ['-O'])
65
66 # Get reproducible floating-point results on x86
67 if config.arch == 'i386':
68    sse2_opts = '-msse2'
69 else:
70    sse2_opts = ''
71
72 test('T4321',
73      omit_ways(['ghci']),
74      compile_and_run, ['-O ' + sse2_opts])
75
76 test('T3736',
77      extra_clean(['T3736.speed.f32']),
78      run_command,
79      ['$MAKE -s --no-print-directory T3736'])
80 test('T3738',
81      [extra_clean(['T3738a.hi', 'T3738a.o']),
82       stats_num_field('peak_megabytes_allocated', (1, 0)),
83                                  # expected value: 1 (amd64/Linux)
84       stats_num_field('bytes allocated',
85                       [(wordsize(32), 45648, 5),
86                     # expected value: 45648 (x86/Linux)
87                        (wordsize(64), 49400, 5)]),
88                     # expected value: 49400 (amd64/Linux)
89       only_ways(['normal'])
90       ],
91      compile_and_run,
92      ['-O'])
93
94 test('MethSharing',
95      [stats_num_field('peak_megabytes_allocated', (1, 0)),
96                                  # expected value: 1 (amd64/Linux)
97       stats_num_field('bytes allocated',
98                       [(wordsize(32), 360940756, 5),
99                     # expected value: 2685858140 (x86/OS X)
100                           # expected: 360940756 (x86/Linux)
101                        (wordsize(64), 640067672, 5)]),
102                           # expected: 640067672 (amd64/Linux)
103       only_ways(['normal'])
104       ],
105      compile_and_run,
106      ['-O'])
107 test('T2902',
108      extra_clean(['T2902_A',    'T2902_B',
109                   'T2902_A.hi', 'T2902_B.hi',
110                   'T2902_A.o',  'T2902_B.o',
111                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
112                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
113                   'T2902_Sum.hi',
114                   'T2902_Sum.o']),
115      run_command,
116      ['$MAKE -s --no-print-directory T2902'])
117 test('T149',
118      [ # expect_broken(149),
119        # working (2 Jul 2013, x86-64/Linux)
120       extra_clean(['T149_A',    'T149_B',
121                    'T149_A.hi', 'T149_B.hi',
122                    'T149_A.o',  'T149_B.o'])],
123      run_command,
124      ['$MAKE -s --no-print-directory T149'])
125
126 test('T5113',
127      [stats_num_field('bytes allocated',
128                       [(wordsize(32), 4000000, 5),
129                        (wordsize(64), 8000000, 5)]),
130       only_ways(['normal'])
131       ],
132      compile_and_run,
133      ['-O'])
134
135
136 test('T4978',
137      [stats_num_field('bytes allocated',
138                       [(wordsize(32), 10000000, 5),
139                        (wordsize(64), 10137680, 5)]),
140                     # expected value: 10137680 (amd64/Linux)
141       only_ways(['normal'])
142       ],
143      compile_and_run,
144      ['-O2'])
145
146 test('T5205',
147      [stats_num_field('bytes allocated',
148                       [(wordsize(32), 47088, 5),
149                     # expected value: 47088 (x86/Darwin)
150                        (wordsize(64), 51320, 5)]),
151                     # expected value: 51320 (amd64/Linux)
152       only_ways(['normal', 'optasm'])
153       ],
154      compile_and_run,
155      [''])
156
157 test('T5549',
158      [stats_num_field('bytes allocated',
159                       [(wordsize(32), 3362958676, 5),
160                     # expected value: 3362958676 (Windows)
161                        (wordsize(64), 6725846120, 5)]),
162                     # expected value: 6725846120 (amd64/Linux)
163       only_ways(['normal'])
164       ],
165      compile_and_run,
166      ['-O'])
167
168 test('T4474a',
169      [stats_num_field('bytes allocated',
170                       [(wordsize(32), 2405242767, 5),
171                        (wordsize(64), 4831890304, 5)]),
172                     # expected value: 4831890304 (amd64/OSX)
173       only_ways(['normal'])
174       ],
175      compile_and_run,
176      ['-O'])
177 test('T4474b',
178      [stats_num_field('bytes allocated',
179                       [(wordsize(32), 2405242767, 5),
180                        (wordsize(64), 4831890304, 5)]),
181                     # expected value: 4831890304 (amd64/OSX)
182       only_ways(['normal'])
183       ],
184      compile_and_run,
185      ['-O'])
186 test('T4474c',
187      [stats_num_field('bytes allocated',
188                       [(wordsize(32), 2405242767, 5),
189                        (wordsize(64), 4831890304, 5)]),
190                     # expected value: 4831890304 (amd64/OSX)
191       only_ways(['normal'])
192       ],
193      compile_and_run,
194      ['-O'])
195
196 test('T5237',
197      [stats_num_field('bytes allocated',
198                         [(wordsize(32), 78328, 5),
199                       # expected value: 78328 (i386/Linux)
200                          (wordsize(64), 104176, 5)]),
201                       # expected value: 110888 (amd64/Linux)
202                       # expected value: 104176 (amd64/Linux)
203      only_ways(['normal'])
204      ],
205     compile_and_run,
206     ['-O ' + sse2_opts])
207
208 test('T5536',
209      [stats_num_field('bytes allocated',
210                       [(wordsize(32), 446260520, 1),
211                                    # 1246287228 (i386/Linux)
212                                     # 446328556 (i386/Windows)
213                                     # 446192484 (i386/OSX)
214                        (wordsize(64), 892399040, 5)]),
215                    # expected value: 2492589480 (amd64/Linux)
216                    # 17/1/13:         892399040 (x86_64/Linux)
217                    #                  (new demand analyser)
218      extra_clean(['T5536.data']),
219      ignore_output,
220      only_ways(['normal'])
221      ],
222     compile_and_run,
223     ['-O'])
224
225 test('T7257',
226      [stats_num_field('bytes allocated',
227                       [(wordsize(32), 1150000000, 10),
228                     # expected value: 1246287228 (i386/Linux)
229                        (wordsize(64), 1774893760, 5)]),
230                         # 2012-09-21: 1774893760 (amd64/Linux)
231       stats_num_field('peak_megabytes_allocated',
232                       [(wordsize(32), 217, 5),
233                         # 2012-10-08: 217 (x86/Linux)
234                        (wordsize(64), 227, 5)]),
235                         # 2012-09-21: 227 (amd64/Linux)
236
237       only_ways(['normal'])
238      ],
239     compile_and_run, ['-O'])
240
241 test('Conversions',
242      [stats_num_field('bytes allocated',
243                       [(wordsize(32), 76768, 2),
244                         # 2012-12-18: 55316 Guessed 64-bit value / 2
245                         # 2013-02-10: 77472 (x86/OSX)
246                         # 2013-02-10: 79276 (x86/Windows)
247                         # 2014-01-13: 76768 (x86/Linux) due to #8647
248                        (wordsize(64), 110632, 5)]),
249                         # 2012-12-18: 109608 (amd64/OS X)
250
251       only_ways(['normal'])
252      ],
253     compile_and_run, ['-O -msse2'])
254
255 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
256 # For 7507, stack overflow is the bad case
257
258 test('T7436',
259      [stats_num_field('max_bytes_used',
260           [(wordsize(64), 60360, 1),
261            #             127000 (amd64/Linux)
262            # 2013-02-07:  60360 (amd64/Linux)
263            (wordsize(32), 58434, 1)]),
264             # 2013-02-10: 58032 (x86/Windows)
265             # 2013-02-10: 58836 (x86/OSX)
266       only_ways(['normal'])
267       ],
268      compile_and_run,
269      ['-O'])
270
271 test('T7797',
272       [stats_num_field('bytes allocated',
273                       [(wordsize(32), 240044984, 5),
274                           # expected value: 2685858140 (x86/OS X)
275                           # expected: 360940756 (x86/Linux)
276                           # expected: 240044984 (x86/Windows, 64bit machine)
277                        (wordsize(64), 480050944, 5)]),
278                           # expected: 480050944 (amd64/Linux)
279       extra_clean(['T7797a.hi', 'T7797a.o']),
280       only_ways(['normal'])
281       ],
282      compile_and_run,
283      ['-O'])
284
285 test('T7954',
286       [stats_num_field('bytes allocated',
287                       [(wordsize(32), 1380051408, 10),
288                        (wordsize(64), 2720051528, 10)]),
289       only_ways(['normal'])
290       ],
291      compile_and_run,
292      ['-O'])
293
294 test('T7850',
295      [stats_num_field('peak_megabytes_allocated', 
296                       [(wordsize(32), 2, 10),
297                        (wordsize(64), 4, 10)]),
298       only_ways(['normal'])],
299      compile_and_run,
300      ['-O'])
301
302 test('T5949',
303      [stats_num_field('bytes allocated',
304                       [ (wordsize(64), 201008, 10)]),
305                       # previously, it was >400000 bytes
306       only_ways(['normal'])],
307      compile_and_run,
308      ['-O'])
309
310 test('T4267',
311      [stats_num_field('bytes allocated',
312                       [ (wordsize(64), 130000, 10)]),
313                       # previously, it was >170000 bytes
314       only_ways(['normal'])],
315      compile_and_run,
316      ['-O'])
317
318 test('T7619',
319      [stats_num_field('bytes allocated',
320                       [ (wordsize(64), 40992, 10)]),
321                       # previously, it was >400000 bytes
322       only_ways(['normal'])],
323      compile_and_run,
324      ['-O'])
325