s.swift.html
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<html>
<title>s.swift</title>
<meta charset="utf-8" />
<head>
<link rel='stylesheet' type='text/css' href='style.css'>
<script type="text/javascript">
/* Simple helper to show/hide the expanded message of a remark. */
function toggleExpandedMessage(e) {
var FullTextElems = e.parentElement.parentElement.getElementsByClassName("full-info");
if (!FullTextElems || FullTextElems.length < 1) {
return false;
}
var FullText = FullTextElems[0];
if (FullText.style.display == 'none') {
e.innerHTML = '-';
FullText.style.display = 'block';
} else {
e.innerHTML = '+';
FullText.style.display = 'none';
}
}
</script>
</head>
<body>
<div class="centered">
<table class="source">
<thead>
<tr>
<th style="width: 2%">Line</td>
<th style="width: 3%">Hotness</td>
<th style="width: 10%">Optimization</td>
<th style="width: 70%">Source</td>
<th style="width: 15%">Inline Context</td>
</tr>
</thead>
<tbody>
<tr>
<td><a name="L1">1</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>infix operator •: AdditionPrecedence</pre></div></td>
</tr>
<tr>
<td><a name="L2">2</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre></pre></div></td>
</tr>
<tr>
<td><a name="L3">3</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>func • (a: Int, b: Int) -> Int {</pre></div></td>
</tr>
<tr>
<td><a name="L4">4</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre> return a * b</pre></div></td>
</tr>
<tr>
<td><a name="L5">5</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>}</pre></div></td>
</tr>
<tr>
<td><a name="L6">6</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre></pre></div></td>
</tr>
<tr>
<td><a name="L7">7</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>@inline(never)</pre></div></td>
</tr>
<tr>
<td><a name="L8">8</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>func g(a: Int) -> Int{</pre></div></td>
</tr>
<tr>
<td><a name="L9">9</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre> return a + 1</pre></div></td>
</tr>
<tr>
<td><a name="L10">10</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>}</pre></div></td>
</tr>
<tr>
<td><a name="L11">11</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre></pre></div></td>
</tr>
<tr>
<td><a name="L12">12</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre>let i = g(a: 1 • 2)</pre></div></td>
</tr>
<tr>
<td></td>
<td></td>
<td class="column-entry-green">sil-inliner</td>
<td><pre style="display:inline"> </pre><span class="column-entry-yellow"> <a href="s.swift.html#L3">"s.• infix(_:_:)"</a> inlined into "main" (cost = 2, benefit = 40) </span></td>
<td class="column-entry-yellow">main</td>
</tr>
<tr>
<td><a name="L13">13</a></td>
<td></td>
<td></td>
<td><div class="highlight"><pre></pre></div></td>
</tr>
</tbody>
</table>
</body>
</html>