Skip to content

Commit

Permalink
Merge pull request #747 from ChrisRackauckas/inference
Browse files Browse the repository at this point in the history
inline a bit to remove an inference trigger
  • Loading branch information
oxinabox authored Aug 9, 2021
2 parents 2c18185 + 08ae3a7 commit f2628b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DataStructures"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.9"
version = "0.18.10"


[deps]
Expand Down
4 changes: 2 additions & 2 deletions src/heaps/arrays_as_heaps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function percolate_up!(xs::AbstractArray, i::Integer, x=xs[i], o::Ordering=Forwa
xs[i] = x
end

percolate_up!(xs::AbstractArray, i::Integer, o::Ordering) = percolate_up!(xs, i, xs[i], o)
@inline percolate_up!(xs::AbstractArray, i::Integer, o::Ordering) = percolate_up!(xs, i, xs[i], o)

"""
heappop!(v, [ord])
Expand All @@ -68,7 +68,7 @@ end
Given a binary heap-ordered array, push a new element `x`, preserving the heap property.
For efficiency, this function does not check that the array is indeed heap-ordered.
"""
function heappush!(xs::AbstractArray, x, o::Ordering=Forward)
@inline function heappush!(xs::AbstractArray, x, o::Ordering=Forward)
push!(xs, x)
percolate_up!(xs, length(xs), o)
return xs
Expand Down
2 changes: 1 addition & 1 deletion src/heaps/binary_heap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Base.isempty(h::BinaryHeap) = isempty(h.valtree)
Adds the `value` element to the heap `h`.
"""
function Base.push!(h::BinaryHeap, v)
@inline function Base.push!(h::BinaryHeap, v)
heappush!(h.valtree, v, h.ordering)
return h
end
Expand Down

2 comments on commit f2628b7

@oxinabox
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/42489

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.18.10 -m "<description of version>" f2628b72cef8a93184945a5860533e5cddb488bf
git push origin v0.18.10

Please sign in to comment.