testsuite: Bump a performance tests
[ghc.git] / testsuite / tests / perf / compiler / T10547.hs
1 -- Reported by sjcjoosten in T10547, this was taking forever because of a bug in
2 -- the implementation. See bottom of the file for some notes.
3
4 module Test where
5
6 type T12 = T11
7 type T11 = T10
8 type T10 = T9
9 type T9 = T8
10 type T8 = T7
11 type T7 = T6
12 type T6 = T5
13 type T5 = T4
14 type T4 = T3
15 type T3 = T2
16 type T2 = T1
17 type T1 = T0
18 type T0 = Int
19
20 type S12 = S11
21 type S11 = S10
22 type S10 = S9
23 type S9 = S8
24 type S8 = S7
25 type S7 = S6
26 type S6 = S5
27 type S5 = S4
28 type S4 = S3
29 type S3 = S2
30 type S2 = S1
31 type S1 = S0
32 type S0 = Int
33
34 test :: (T12, Char) -> (S12, Bool) -> Int
35 test a b = const 1 (f a b)
36
37 f :: (a, b) -> (a, b) -> (a, b)
38 f a _ = a
39
40 -- 5416fad, before the fix:
41 --
42 -- 16,990,408,080 bytes allocated in the heap
43 -- 49,762,144 bytes copied during GC
44 -- 4,295,384 bytes maximum residency (5 sample(s))
45 -- 186,272 bytes maximum slop
46 -- 12 MB total memory in use (0 MB lost due to fragmentation)
47 --
48 -- Tot time (elapsed) Avg pause Max pause
49 -- Gen 0 26929 colls, 0 par 0.779s 0.779s 0.0000s 0.0009s
50 -- Gen 1 5 colls, 0 par 0.040s 0.040s 0.0080s 0.0099s
51 --
52 -- TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)
53 --
54 -- SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
55 --
56 -- INIT time 0.001s ( 0.001s elapsed)
57 -- MUT time 3.409s ( 3.409s elapsed)
58 -- GC time 0.819s ( 0.819s elapsed)
59 -- EXIT time 0.008s ( 0.012s elapsed)
60 -- Total time 4.256s ( 4.240s elapsed)
61 --
62 -- Alloc rate 4,984,597,832 bytes per MUT second
63 --
64 -- Productivity 80.7% of total user, 81.1% of total elapsed
65 --
66 -- After the fix:
67 --
68 -- 39,165,544 bytes allocated in the heap
69 -- 19,516,400 bytes copied during GC
70 -- 4,460,568 bytes maximum residency (5 sample(s))
71 -- 244,640 bytes maximum slop
72 -- 11 MB total memory in use (0 MB lost due to fragmentation)
73 --
74 -- Tot time (elapsed) Avg pause Max pause
75 -- Gen 0 44 colls, 0 par 0.009s 0.009s 0.0002s 0.0007s
76 -- Gen 1 5 colls, 0 par 0.040s 0.040s 0.0080s 0.0099s
77 --
78 -- TASKS: 4 (1 bound, 3 peak workers (3 total), using -N1)
79 --
80 -- SPARKS: 0 (0 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
81 --
82 -- INIT time 0.001s ( 0.001s elapsed)
83 -- MUT time 0.009s ( 0.009s elapsed)
84 -- GC time 0.049s ( 0.049s elapsed)
85 -- EXIT time 0.008s ( 0.012s elapsed)
86 -- Total time 0.096s ( 0.070s elapsed)
87 --
88 -- Alloc rate 4,570,081,011 bytes per MUT second
89 --
90 -- Productivity 48.2% of total user, 65.9% of total elapsed