Skip to content

Commit 90c0ca6

Browse files
Explain why twoended_merge! is used in comment
Co-authored-by: Lilith Orion Hafner <[email protected]>
1 parent cd72df0 commit 90c0ca6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/SortingAlgorithms.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ end
685685
###
686686

687687
# merge v[lo:hiA] and v[hiA+1:hi] ([A;B]) using buffer t[1:1 + hi-lo]
688+
# this is faster than merge! but requires twice as much auxiliary memory.
688689
function twoended_merge!(v::AbstractVector{T}, t::AbstractVector{T}, lo::Integer, hiA::Integer, hi::Integer, o::Ordering) where T
689690
@assert lo <= hiA <= hi
690691
loA = lo

0 commit comments

Comments
 (0)