Update 32bit & 64bit performance 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), 63216 , 5),
61               # 2013-02-14: 1263712 (x86_64/Linux)
62               # 2014-02-10:   63216 (x86_64/Linux), call arity analysis
63            (wordsize(32), 53024, 5) ]),
64               # some date:  663712  (Windows, 64-bit machine)
65               # 2014-04-04:  56820  (Windows, 64-bit machine)
66               # 2014-06-29:  53024  (x86_64/Linux)
67       only_ways(['normal']),
68       extra_run_opts('10000')
69       ],
70      compile_and_run,
71      ['-O'])
72
73 # Get reproducible floating-point results on x86
74 if config.arch == 'i386':
75    sse2_opts = '-msse2'
76 else:
77    sse2_opts = ''
78
79 test('T4321',
80      omit_ways(['ghci']),
81      compile_and_run, ['-O ' + sse2_opts])
82
83 test('T3736',
84      extra_clean(['T3736.speed.f32']),
85      run_command,
86      ['$MAKE -s --no-print-directory T3736'])
87 test('T3738',
88      [extra_clean(['T3738a.hi', 'T3738a.o']),
89       stats_num_field('peak_megabytes_allocated', (1, 0)),
90                                  # expected value: 1 (amd64/Linux)
91       stats_num_field('bytes allocated',
92                       [(wordsize(32), 45648, 5),
93                     # expected value: 45648 (x86/Linux)
94                        (wordsize(64), 49400, 5)]),
95                     # expected value: 49400 (amd64/Linux)
96       only_ways(['normal'])
97       ],
98      compile_and_run,
99      ['-O'])
100
101 test('MethSharing',
102      [stats_num_field('peak_megabytes_allocated', (1, 0)),
103                                  # expected value: 1 (amd64/Linux)
104       stats_num_field('bytes allocated',
105                       [(wordsize(32), 360940756, 5),
106                     # expected value: 2685858140 (x86/OS X)
107                           # expected: 360940756 (x86/Linux)
108                        (wordsize(64), 640067672, 5)]),
109                           # expected: 640067672 (amd64/Linux)
110       only_ways(['normal'])
111       ],
112      compile_and_run,
113      ['-O'])
114 test('T2902',
115      extra_clean(['T2902_A',    'T2902_B',
116                   'T2902_A.hi', 'T2902_B.hi',
117                   'T2902_A.o',  'T2902_B.o',
118                   'T2902_A_PairingSum.hi', 'T2902_B_PairingSum.hi',
119                   'T2902_A_PairingSum.o',  'T2902_B_PairingSum.o',
120                   'T2902_Sum.hi',
121                   'T2902_Sum.o']),
122      run_command,
123      ['$MAKE -s --no-print-directory T2902'])
124 test('T149',
125      [ # expect_broken(149),
126        # working (2 Jul 2013, x86-64/Linux)
127       extra_clean(['T149_A',    'T149_B',
128                    'T149_A.hi', 'T149_B.hi',
129                    'T149_A.o',  'T149_B.o'])],
130      run_command,
131      ['$MAKE -s --no-print-directory T149'])
132
133 test('T5113',
134      [stats_num_field('bytes allocated',
135                       [(wordsize(32), 4000000, 5),
136                        (wordsize(64), 8000000, 5)]),
137       only_ways(['normal'])
138       ],
139      compile_and_run,
140      ['-O'])
141
142
143 test('T4978',
144      [stats_num_field('bytes allocated',
145                       [(wordsize(32), 10000000, 5),
146                        (wordsize(64), 10137680, 5)]),
147                     # expected value: 10137680 (amd64/Linux)
148       only_ways(['normal'])
149       ],
150      compile_and_run,
151      ['-O2'])
152
153 test('T5205',
154      [stats_num_field('bytes allocated',
155                       [(wordsize(32), 47088, 5),
156                     # expected value: 47088 (x86/Darwin)
157                        (wordsize(64), 51320, 5)]),
158                     # expected value: 51320 (amd64/Linux)
159       only_ways(['normal', 'optasm'])
160       ],
161      compile_and_run,
162      [''])
163
164 test('T5549',
165      [stats_num_field('bytes allocated',
166                       [(wordsize(32), 3362958676, 5),
167                     # expected value: 3362958676 (Windows)
168                        (wordsize(64), 6725846120, 5)]),
169                     # expected value: 6725846120 (amd64/Linux)
170       only_ways(['normal'])
171       ],
172      compile_and_run,
173      ['-O'])
174
175 test('T4474a',
176      [stats_num_field('bytes allocated',
177                       [(wordsize(32), 2405242767, 5),
178                        (wordsize(64), 4831890304, 5)]),
179                     # expected value: 4831890304 (amd64/OSX)
180       only_ways(['normal'])
181       ],
182      compile_and_run,
183      ['-O'])
184 test('T4474b',
185      [stats_num_field('bytes allocated',
186                       [(wordsize(32), 2405242767, 5),
187                        (wordsize(64), 4831890304, 5)]),
188                     # expected value: 4831890304 (amd64/OSX)
189       only_ways(['normal'])
190       ],
191      compile_and_run,
192      ['-O'])
193 test('T4474c',
194      [stats_num_field('bytes allocated',
195                       [(wordsize(32), 2405242767, 5),
196                        (wordsize(64), 4831890304, 5)]),
197                     # expected value: 4831890304 (amd64/OSX)
198       only_ways(['normal'])
199       ],
200      compile_and_run,
201      ['-O'])
202
203 test('T5237',
204      [stats_num_field('bytes allocated',
205                         [(platform('i386-unknown-mingw32'), 73280, 5),
206                          (wordsize(32), 78328, 5),
207                       # expected value: 78328 (i386/Linux)
208                          (wordsize(64), 104176, 5)]),
209                       # expected value: 110888 (amd64/Linux)
210                       # expected value: 104176 (amd64/Linux)
211      only_ways(['normal'])
212      ],
213     compile_and_run,
214     ['-O ' + sse2_opts])
215
216 test('T5536',
217      [stats_num_field('bytes allocated',
218                       [(wordsize(32), 446260520, 1),
219                                    # 1246287228 (i386/Linux)
220                                     # 446328556 (i386/Windows)
221                                     # 446192484 (i386/OSX)
222                        (wordsize(64), 892399040, 5)]),
223                    # expected value: 2492589480 (amd64/Linux)
224                    # 17/1/13:         892399040 (x86_64/Linux)
225                    #                  (new demand analyser)
226      extra_clean(['T5536.data']),
227      ignore_output,
228      only_ways(['normal'])
229      ],
230     compile_and_run,
231     ['-O'])
232
233 test('T7257',
234      [stats_num_field('bytes allocated',
235                       [(wordsize(32), 1150000000, 10),
236                     # expected value: 1246287228 (i386/Linux)
237                        (wordsize(64), 1774893760, 5)]),
238                         # 2012-09-21: 1774893760 (amd64/Linux)
239       stats_num_field('peak_megabytes_allocated',
240                       [(wordsize(32), 217, 5),
241                         # 2012-10-08: 217 (x86/Linux)
242                        (wordsize(64), 227, 5)]),
243                         # 2012-09-21: 227 (amd64/Linux)
244
245       only_ways(['normal'])
246      ],
247     compile_and_run, ['-O'])
248
249 test('Conversions',
250      [stats_num_field('bytes allocated',
251                       [(wordsize(32), 76768, 3),
252                         # 2012-12-18: 55316 Guessed 64-bit value / 2
253                         # 2013-02-10: 77472 (x86/OSX)
254                         # 2013-02-10: 79276 (x86/Windows)
255                         # 2014-01-13: 76768 (x86/Linux) due to #8647
256                        (wordsize(64), 110632, 5)]),
257                         # 2012-12-18: 109608 (amd64/OS X)
258
259       only_ways(['normal'])
260      ],
261     compile_and_run, ['-O -msse2'])
262
263 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
264 # For 7507, stack overflow is the bad case
265
266 test('T7436',
267      [stats_num_field('max_bytes_used',
268           [(wordsize(64), 60360, 1),
269            #             127000 (amd64/Linux)
270            # 2013-02-07:  60360 (amd64/Linux)
271            (wordsize(32), 58434, 1)]),
272             # 2013-02-10: 58032 (x86/Windows)
273             # 2013-02-10: 58836 (x86/OSX)
274       only_ways(['normal'])
275       ],
276      compile_and_run,
277      ['-O'])
278
279 test('T7797',
280       [stats_num_field('bytes allocated',
281                       [(wordsize(32), 240044984, 5),
282                           # expected value: 2685858140 (x86/OS X)
283                           # expected: 360940756 (x86/Linux)
284                           # expected: 240044984 (x86/Windows, 64bit machine)
285                        (wordsize(64), 480050944, 5)]),
286                           # expected: 480050944 (amd64/Linux)
287       extra_clean(['T7797a.hi', 'T7797a.o']),
288       only_ways(['normal'])
289       ],
290      compile_and_run,
291      ['-O'])
292
293 test('T7954',
294       [stats_num_field('bytes allocated',
295                       [(wordsize(32), 920045264, 10),
296               # some date:  1380051408    (64-bit Windows machine)
297               # 2014-04-04:  920045264    (64-bit Windows machine)
298                        (wordsize(64), 1680051336, 10)]),
299               # 2014-02-10: 1680051336 (x86_64/Linux), call arity analysis
300       only_ways(['normal'])
301       ],
302      compile_and_run,
303      ['-O'])
304
305 test('T7850',
306      [stats_num_field('peak_megabytes_allocated', 
307                       [(wordsize(32), 2, 10),
308                        (wordsize(64), 4, 10)]),
309       only_ways(['normal'])],
310      compile_and_run,
311      ['-O'])
312
313 test('T5949',
314      [stats_num_field('bytes allocated',
315                       [ (wordsize(32), 116020, 10),
316                         (wordsize(64), 201008, 10)]),
317                       # previously, it was >400000 bytes
318       only_ways(['normal'])],
319      compile_and_run,
320      ['-O'])
321
322 test('T4267',
323      [stats_num_field('bytes allocated',
324                       [ (wordsize(32), 36012, 10)
325                       # 32-bit value close to 64 bit; c.f. T7619
326                       , (wordsize(64), 40992, 10) ]),
327                       # previously, it was >170000 bytes
328                       # 2014-01-17: 130000
329                       # 2014-02-10: 40992 (x86_64/Linux), call arity analysis
330       only_ways(['normal'])],
331      compile_and_run,
332      ['-O'])
333
334 test('T7619',
335      [stats_num_field('bytes allocated',
336                       [ (wordsize(32), 36012, 10)
337                       # 32-bit close to 64-bit value; most of this very 
338                       # small number is standard start-up boilerplate I think
339                       , (wordsize(64), 40992, 10) ]),
340                       # previously, it was >400000 bytes
341       only_ways(['normal'])],
342      compile_and_run,
343      ['-O'])
344
345 test('InlineArrayAlloc',
346      [stats_num_field('bytes allocated',
347                       [ (wordsize(32), 800040960, 5)
348                       , (wordsize(64), 1600040960, 5) ]),
349       only_ways(['normal'])],
350      compile_and_run,
351      ['-O2'])
352
353 test('InlineByteArrayAlloc',
354      [stats_num_field('bytes allocated',
355                       [ (wordsize(32), 1360036012, 5)
356                       , (wordsize(64), 1440040960, 5) ]),
357          # 32 and 64 bit not so different, because 
358          # we are allocating *byte* arrays
359       only_ways(['normal'])],
360      compile_and_run,
361      ['-O2'])
362
363 test('InlineCloneArrayAlloc',
364      [stats_num_field('bytes allocated',
365                       [ (wordsize(32), 800041120, 5) 
366                       , (wordsize(64), 1600041120, 5) ]),
367       only_ways(['normal'])],
368      compile_and_run,
369      ['-O2'])
370
371 test('T9203',
372      [stats_num_field('bytes allocated',
373                       [ (wordsize(32), 50000000, 5)
374                       , (wordsize(64), 95747304, 5) ]),
375       only_ways(['normal'])],
376      compile_and_run,
377      ['-O2'])