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

Use QuickSort rather than MergeSort by default for Union{<:Number, Missing} arrays #27789

Merged
merged 1 commit into from Jun 28, 2018

Conversation

nalimilan
Copy link
Member

@nalimilan nalimilan commented Jun 26, 2018

This eliminates allocations and is about 30% faster for Vector{Union{Float64,Missing}}.

Mitigates (but doesn't completely fix) #27781.

Benchmark added at JuliaCI/BaseBenchmarks.jl#211.

@nalimilan nalimilan added performance Must go faster domain:missing data Base.missing and related functionality labels Jun 26, 2018
…ssing} arrays

This eliminates allocations and is about 30% faster.
@nalimilan
Copy link
Member Author

@nanosoldier runbenchmarks("sort" || "union", vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

@nalimilan
Copy link
Member Author

Really nice results (apart from a few unrelated things):

ID time ratio memory ratio
["union", "array", "("sort", BigFloat, true)"] 1.01 (15%) 0.66 (1%)
["union", "array", "("sort", BigInt, true)"] 0.86 (15%) 0.66 (1%)
["union", "array", "("sort", Bool, true)"] 0.63 (15%) 0.65 (1%)
["union", "array", "("sort", Float32, true)"] 0.85 (15%) 0.66 (1%)
["union", "array", "("sort", Float64, true)"] 0.84 (15%) 0.66 (1%)
["union", "array", "("sort", Int64, true)"] 0.68 (15%) 0.66 (1%)
["union", "array", "("sort", Int8, true)"] 0.66 (15%) 0.65 (1%)

@nalimilan
Copy link
Member Author

OK to merge?

@nalimilan nalimilan merged commit 7ebcbc0 into master Jun 28, 2018
@nalimilan nalimilan deleted the nl/sortmissing branch June 28, 2018 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:missing data Base.missing and related functionality performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants