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 8e5e4a8 commit 228deaaCopy full SHA for 228deaa
Sources/HeapModule/Heap.swift
@@ -381,7 +381,7 @@ extension Heap {
381
//
382
// FIXME: Write a benchmark to verify this heuristic.
383
let heuristicLimit = 2 * newCount / newCount._binaryLogarithm()
384
- let useFloyd = (newCount - origCount) < heuristicLimit
+ let useFloyd = (newCount - origCount) > heuristicLimit
385
_update { handle in
386
if useFloyd {
387
handle.heapify()
0 commit comments