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

Add benchmarks for map and broadcast with Union{T, Missing} arrays #176

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

nalimilan
Copy link
Collaborator

Add benchmarks comparing a simple loop with map and broadcast. Use missing instead of nothing since it propagates with standard operations, which allows testing more cases.

These are the benchmarks associated with JuliaLang/julia#25828.

@ararslan
Copy link
Member

These will either need to be behind a version guard or we'll need to introduce a dependency on Missings for 0.6 support.

@nalimilan
Copy link
Collaborator Author

Ah, indeed. I've reverted the move to missing then, we can use custom methods for now.

Add benchmarks comparing a simple loop with map() and broadcast().
g["perf_sum", string(typeof(A))] = @benchmarkable perf_sum($A)
g["perf_countnothing", string(typeof(A))] = @benchmarkable perf_countnothing($A)
for (M, A) in ((false, X), (true, X2))
g["perf_sum", T, M] = @benchmarkable perf_sum($A)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I wasn't sure how the benchmarks names work: is it OK to use three dimensions and to use values directly rather than strings?

Copy link
Member

Choose a reason for hiding this comment

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

I don't really know. @jrevels?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, you can use arbitrary tuples of values for benchmark keys

Copy link
Member

Choose a reason for hiding this comment

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

the main guideline is to keep them relatively short - long keys are formatted annoyingly in benchmark reports

@nalimilan
Copy link
Collaborator Author

Good to go?

@ararslan ararslan merged commit 33372ac into JuliaCI:master Feb 2, 2018
@nalimilan nalimilan deleted the nl/missing branch February 2, 2018 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants