Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of sizehint! on BinaryHeap #907

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update binary_heap.jl
  • Loading branch information
Tortar committed Apr 17, 2024
commit f024b0d2f739bb6fff7df1daf2f791fe06f7a14a
2 changes: 1 addition & 1 deletion src/heaps/binary_heap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mutable struct BinaryHeap{T, O <: Base.Ordering} <: AbstractHeap{T}
end

function BinaryHeap{T}(ordering::Base.Ordering, xs::AbstractVector) where T
valtree = @inline heapify!(copyto!(similar(xs), xs), ordering)
valtree = @inline heapify(xs, ordering)
new{T, typeof(ordering)}(ordering, valtree)
end
end
Expand Down
Loading