Open
Description
Compare these
julia> using DataStructures, BenchmarkTools
julia> pq = PriorityQueue(1 => 0.2, 2=>0.3)
PriorityQueue{Int64, Float64, Base.Order.ForwardOrdering} with 2 entries:
1 => 0.2
2 => 0.3
julia> @btime first(pq)
119.160 ns (8 allocations: 736 bytes)
1 => 0.2
julia> @btime pq.xs[1]
29.283 ns (2 allocations: 64 bytes)
1 => 0.2
Metadata
Metadata
Assignees
Labels
No labels