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