Skip to content

Commit 07ffd65

Browse files
committed
[Heap] Don't always inline large functions
1 parent cc69069 commit 07ffd65

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

Sources/PriorityQueueModule/Heap.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ public struct Heap<Element: Comparable> {
149149

150150
// MARK: -
151151

152-
@inline(__always)
153152
@inlinable
154153
internal mutating func _bubbleUp(elementAt index: Int) {
155154
guard let parentIdx = _parentIndex(of: index) else {
@@ -177,7 +176,6 @@ public struct Heap<Element: Comparable> {
177176
}
178177
}
179178

180-
@inline(__always)
181179
@inlinable
182180
internal mutating func _bubbleUpMin(elementAt index: Int) {
183181
var index = index
@@ -189,7 +187,6 @@ public struct Heap<Element: Comparable> {
189187
}
190188
}
191189

192-
@inline(__always)
193190
@inlinable
194191
internal mutating func _bubbleUpMax(elementAt index: Int) {
195192
var index = index
@@ -222,7 +219,6 @@ public struct Heap<Element: Comparable> {
222219

223220
// MARK: -
224221

225-
@inline(__always)
226222
@inlinable
227223
internal mutating func _trickleDown(elementAt index: Int) {
228224
// Figure out if `index` is on an even or odd level
@@ -235,7 +231,6 @@ public struct Heap<Element: Comparable> {
235231
}
236232
}
237233

238-
@inline(__always)
239234
@inlinable
240235
internal mutating func _trickleDownMin(elementAt index: Int) {
241236
var index = index
@@ -262,7 +257,6 @@ public struct Heap<Element: Comparable> {
262257
}
263258
}
264259

265-
@inline(__always)
266260
@inlinable
267261
internal mutating func _trickleDownMax(elementAt index: Int) {
268262
var index = index
@@ -296,7 +290,6 @@ public struct Heap<Element: Comparable> {
296290
///
297291
/// - parameter index: The index of the element whose descendants should be
298292
/// compared.
299-
@inline(__always)
300293
@inlinable
301294
internal func _indexOfLowestPriorityChildOrGrandchild(
302295
of index: Int
@@ -350,7 +343,6 @@ public struct Heap<Element: Comparable> {
350343
///
351344
/// - parameter index: The index of the item whose descendants should be
352345
/// compared.
353-
@inline(__always)
354346
@inlinable
355347
internal func _indexOfHighestPriorityChildOrGrandchild(
356348
of index: Int

0 commit comments

Comments
 (0)