We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca2969 commit 9d70c19Copy full SHA for 9d70c19
Sources/Algorithms/Partition.swift
@@ -283,14 +283,6 @@ extension Collection {
283
284
let count = self.count
285
286
- // The overhead of this implementation isn’t worth it for collections fewer
287
- // than 8 elements. Use the simple `Sequence`-based implementation instead.
288
- // This constant was determined using benchmarking. More information:
289
- // https://github.com/apple/swift-algorithms/pull/152#issuecomment-887130149
290
- if count < 8 {
291
- return try _partitioned(belongsInSecondCollection)
292
- }
293
-
294
// Inside of the `initializer` closure, we set what the actual mid-point is.
295
// We will use this to partitioned the single array into two in constant time.
296
var midPoint: Int = 0
0 commit comments